?? about.java
字號:
// About.java
import com.ms.wfc.app.*;
import com.ms.wfc.core.*;
import com.ms.wfc.ui.*;
public class About extends Form
{
private void okButton_click(Object sender, Event e)
{
this.setDialogResult(DialogResult.OK);
}
public About()
{
super();
//Required for Visual J++ Form Designer support
initForm();
// Set Avail System Memory Information
com.ms.win32.MEMORYSTATUS lpMemStat = new com.ms.win32.MEMORYSTATUS();
GlobalMemoryStatus(lpMemStat);
availableMemoryLabel.setText(Integer.toString(lpMemStat.dwTotalPhys/1024) + " KB");
}
public void dispose()
{
super.dispose();
components.dispose();
}
Container components = new Container();
Button okButton = new Button();
Label titleLabel = new Label();
Label 不是把 = new Label();
Label nameLabel = new Label();
Label memoryLabel = new Label();
Label availableMemoryLabel = new Label();
private void initForm()
{
okButton.setLocation(new Point(208, 192));
okButton.setSize(new Point(84, 23));
okButton.setTabIndex(0);
okButton.setText("OK");
okButton.addOnClick(new EventHandler(this.okButton_click));
this.setText("About JPad");
this.setAcceptButton(okButton);
this.setAutoScaleBaseSize(new Point(6, 12));
this.setBorderStyle(FormBorderStyle.FIXED_TOOLWINDOW);
this.setCancelButton(okButton);
this.setClientSize(new Point(298, 241));
this.setMaximizeBox(false);
this.setMinimizeBox(false);
this.setStartPosition(FormStartPosition.CENTER_SCREEN);
titleLabel.setLocation(new Point(10, 10));
titleLabel.setSize(new Point(280, 40));
titleLabel.setTabIndex(1);
titleLabel.setTabStop(false);
titleLabel.setText("JPad Title Text");
不是把.setAnchor(ControlAnchor.TOPBOTTOMRIGHT);
不是把.setFont(new Font("宋體", 9.0f));
不是把.setForeColor(Color.WINDOWTEXT);
不是把.setLocation(new Point(16, 64));
不是把.setSize(new Point(280, 12));
不是把.setTabIndex(3);
不是把.setTabStop(false);
不是把.setText("這是什么呀");
不是把.setAutoSize(true);
不是把.setTextAlign(HorizontalAlignment.CENTER);
不是把.setUseMnemonic(false);
nameLabel.setLocation(new Point(10, 90));
nameLabel.setSize(new Point(280, 50));
nameLabel.setTabIndex(4);
nameLabel.setTabStop(false);
nameLabel.setText("Application Description");
memoryLabel.setLocation(new Point(8, 160));
memoryLabel.setSize(new Point(200, 24));
memoryLabel.setTabIndex(2);
memoryLabel.setTabStop(false);
memoryLabel.setText("Memory available to system: ");
availableMemoryLabel.setLocation(new Point(212, 160));
availableMemoryLabel.setSize(new Point(72, 24));
availableMemoryLabel.setTabIndex(5);
availableMemoryLabel.setTabStop(false);
availableMemoryLabel.setText("");
this.setNewControls(new Control[] {
nameLabel,
titleLabel,
memoryLabel,
availableMemoryLabel,
okButton,
不是把});
}
public static void main(String args[])
{
Application.run(new About());
}
/**
* @dll.import("KERNEL32",auto)
*/
public static native void GlobalMemoryStatus(com.ms.win32.MEMORYSTATUS lpBuffer);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -