资源推荐
资源详情
资源评论
package mycalculation;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
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.Shell;
import org.eclipse.swt.widgets.Text;
import com.swtdesigner.SWTResourceManager;
public class simplecalculation {
private Text text;
public boolean add,sub,div,mul,end;
public String str;
public double num1,num2;
/**
* Launch the application
* @param args
*/
public static void main(String[] args) {
try {
simplecalculation window = new simplecalculation();
window.open();
} catch (Exception e) {
e.printStackTrace();
}
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
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.Shell;
import org.eclipse.swt.widgets.Text;
import com.swtdesigner.SWTResourceManager;
public class simplecalculation {
private Text text;
public boolean add,sub,div,mul,end;
public String str;
public double num1,num2;
/**
* Launch the application
* @param args
*/
public static void main(String[] args) {
try {
simplecalculation window = new simplecalculation();
window.open();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Open the window
*/
public void open() {
end=true;
add=false;
sub=false;
div=false;
mul=false;
final Display display = Display.getDefault();
final Shell shell = new Shell();
shell.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
//当键盘点击时刻
}
});
shell.setBackground(SWTResourceManager.getColor(255, 255, 128));
shell.setSize(321, 285);
shell.setText("简单计算器");
//
shell.open();
text = new Text(shell, SWT.BORDER | SWT.RIGHT);
text.setText("0");
text.setBounds(26, 10, 262, 25);
final Button button = new Button(shell, SWT.NONE);
/**
* Open the window
*/
public void open() {
end=true;
add=false;
sub=false;
div=false;
mul=false;
final Display display = Display.getDefault();
final Shell shell = new Shell();
shell.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
//当键盘点击时刻
}
});
shell.setBackground(SWTResourceManager.getColor(255, 255, 128));
shell.setSize(321, 285);
shell.setText("简单计算器");
//
shell.open();
text = new Text(shell, SWT.BORDER | SWT.RIGHT);
text.setText("0");
text.setBounds(26, 10, 262, 25);
final Button button = new Button(shell, SWT.NONE);
剩余10页未读,继续阅读





上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
已下载
下载帮助

看过该资源的人还看了
没有合适的资源?快使用搜索试试~ 我知道了~
安全验证
文档复制为VIP权益,开通VIP直接复制

- 1
- 2
前往页