/*
* NewApplet.java
*
* Created on 2008年11月20日, 下午12:11
*/
package counter1;
/**
*
* @author Administrator
*/
public class NewApplet extends java.applet.Applet {
double startnum;
double endnum;
boolean isResult=false;
boolean flagAdd=false;
boolean flagSub=false;
boolean flagMul=false;
boolean flagDiv=false;
String strvalue=null;
/** Initializes the applet NewApplet */
public void init() {
try {
java.awt.EventQueue.invokeAndWait(new Runnable() {
public void run() {
initComponents();
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
}
/** This method is called from within the init() method to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jTextField1 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jButton7 = new javax.swing.JButton();
jButton8 = new javax.swing.JButton();
jButton9 = new javax.swing.JButton();
jButton10 = new javax.swing.JButton();
jButton11 = new javax.swing.JButton();
jButton12 = new javax.swing.JButton();
jButton13 = new javax.swing.JButton();
jButton14 = new javax.swing.JButton();
jButton15 = new javax.swing.JButton();
jButton16 = new javax.swing.JButton();
jButton17 = new javax.swing.JButton();
jButton18 = new javax.swing.JButton();
jButton19 = new javax.swing.JButton();
jButton20 = new javax.swing.JButton();
jButton21 = new javax.swing.JButton();
jButton22 = new javax.swing.JButton();
jButton1.setFont(new java.awt.Font("宋体", 0, 14)); // NOI18N
jButton1.setText("1");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setFont(new java.awt.Font("宋体", 0, 14)); // NOI18N
jButton2.setText("2");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton3.setFont(new java.awt.Font("宋体", 0, 14)); // NOI18N
jButton3.setText("3");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton4.setFont(new java.awt.Font("宋体", 0, 14)); // NOI18N
jButton4.setText("4");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton5.setFont(new java.awt.Font("宋体", 0, 14)); // NOI18N
jButton5.setText("5");
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton6.setFont(new java.awt.Font("宋体", 0, 14)); // NOI18N
jButton6.setText("6");
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton7.setFont(new java.awt.Font("宋体", 0, 14)); // NOI18N
jButton7.setText("7");
jButton7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton8.setFont(new java.awt.Font("宋体", 0, 14)); // NOI18N
jButton8.setText("8");
jButton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton9.setFont(new java.awt.Font("宋体", 0, 14)); // NOI18N
jButton9.setText("9");
jButton9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton10.setFont(new java.awt.Font("宋体", 0, 14)); // NOI18N
jButton10.setText("0");
jButton10.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton11.setFont(new java.awt.Font("宋体", 1, 14)); // NOI18N
jButton11.setText("+");
jButton11.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton11ActionPerformed(evt);
}
});
jButton12.setFont(new java.awt.Font("宋体", 1, 14)); // NOI18N
jButton12.setText("-");
jButton12.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton12ActionPerformed(evt);
}
});
jButton13.setFont(new java.awt.Font("宋体", 1, 14)); // NOI18N
jButton13.setText("*");
jButton13.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton13ActionPerformed(evt);
}
});
jButton14.setFont(new java.awt.Font("宋体", 1, 14)); // NOI18N
jButton14.setText("/");
jButton14.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton14ActionPerformed(evt);
}
});
jButton15.setFont(new java.awt.Font("宋体", 1, 12)); // NOI18N
jButton15.setText("sin");
jButton15.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton15ActionPerformed(evt);
}
});
jButton16.setFont(new java.awt.Font("宋体", 1, 12)); // NOI18N
jButton16.setText("cos");
jButton16.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton16ActionPerformed(evt);
}
});
jButton17.setFont(new java.awt.Font("宋体", 1, 14)); // NOI18N
jButton17.setText("n!");
jButton17.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton17ActionPerformed(evt);
}
});
jButton18.setFont(new java.awt.Font("宋体", 1, 14)); // NOI18N
jButton18.setText("off");
jButton18.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton18ActionPerformed(evt);
}
});
jButt
没有合适的资源?快使用搜索试试~ 我知道了~
Java一个计算器的程序
共11个文件
xml:3个
properties:3个
java:2个
需积分: 0 2 下载量 140 浏览量
2009-01-02
12:36:15
上传
评论
收藏 12KB RAR 举报
温馨提示
这是一个用netbeans来编的计算器小程序。我这个菜鸟以编译好几次了!希望没有错!
资源推荐
资源详情
资源评论
收起资源包目录
.rar (11个子文件)
counter1
applet.policy 54B
src
counter1
NewApplet.java 20KB
NewApplet.form 21KB
Main.java 337B
nbproject
genfiles.properties 455B
build-impl.xml 32KB
project.properties 2KB
project.xml 578B
private
private.properties 183B
build.xml 3KB
manifest.mf 85B
test
共 11 条
- 1
资源评论
whc1986
- 粉丝: 14
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功