📄 test.java
字号:
//2007-3-31
package org.surf;
import java.awt.Color;
import java.util.Date;
import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
public class Test {
/**
* Launch the application
*
* @param args
*/
public static void main(String[] args) {
final Display display = Display.getDefault();
final Shell shell = new Shell();
shell.setSize(800, 600);
// Image ico = new Image();
// shell.setImage(ico);
shell.setText("广州峻峰锯业有限公司信息管理系统");
shell.open();
final Button button = new Button(shell, SWT.NONE);
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
}
});
button.setText("clear");
button.setBounds(165, 460, 136, 30);
final Button clearButton = new Button(shell, SWT.NONE);
clearButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
}
});
clearButton.setBounds(494, 460, 136, 30);
clearButton.setText("sign in");
final Label label = new Label(shell, SWT.CENTER);
// label.setFont(ResourceManager.getFont("" ,14 , SWT.BOLD|SWT.ITALIC));
// label.setForeground(Color.orange );
label.setText("广州峻峰锯业有限公司欢迎您");
label.setBounds(95, 92, 602, 64);
final Label label_1 = new Label(shell, SWT.NONE);
label_1.setText("time: ");
label_1.setBounds(537, 529, 147, 13);
final Text text = new Text(shell, SWT.BORDER);
text.setBounds(593, 526, 103, 13);
shell.layout();
// Menu mainMenu = new Menu();
// shell.setMenuBar(mainMenu)
// {
// MenuItem fileItem = new MenuItem (mainMenu,SWT.CASCADE);
// fileItem.setText("文件(&F)");
// }
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -