📄 sy4.java
字号:
/*
* sy4.java
*
* Created on 2006年11月27日, 下午4:51
*/
package javashiyan4;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
/**
*
* @author Administrator
*/
public class sy4 extends java.awt.Frame {
/** Creates new form sy4 */
public sy4() {
initComponents();
}
/** This method is called from within the constructor 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=" 生成的代码 ">//GEN-BEGIN:initComponents
private void initComponents() {
panel1 = new java.awt.Panel();
textField1 = new java.awt.TextField();
panel2 = new java.awt.Panel();
button1 = new java.awt.Button();
button2 = new java.awt.Button();
button3 = new java.awt.Button();
cmd = new java.awt.Button();
cmdd = new java.awt.Button();
panel3 = new java.awt.Panel();
button4 = new java.awt.Button();
button5 = new java.awt.Button();
button6 = new java.awt.Button();
button7 = new java.awt.Button();
button8 = new java.awt.Button();
button9 = new java.awt.Button();
button10 = new java.awt.Button();
button11 = new java.awt.Button();
button12 = new java.awt.Button();
button13 = new java.awt.Button();
button14 = new java.awt.Button();
button15 = new java.awt.Button();
button16 = new java.awt.Button();
button17 = new java.awt.Button();
button18 = new java.awt.Button();
button19 = new java.awt.Button();
setLayout(new java.awt.GridLayout(3, 1));
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
textField1.setText("textField1");
org.jdesktop.layout.GroupLayout panel1Layout = new org.jdesktop.layout.GroupLayout(panel1);
panel1.setLayout(panel1Layout);
panel1Layout.setHorizontalGroup(
panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, panel1Layout.createSequentialGroup()
.add(textField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 390, Short.MAX_VALUE)
.addContainerGap())
);
panel1Layout.setVerticalGroup(
panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(panel1Layout.createSequentialGroup()
.add(5, 5, 5)
.add(textField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(73, Short.MAX_VALUE))
);
add(panel1);
button1.setLabel("BACK");
button1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button1ActionPerformed(evt);
}
});
panel2.add(button1);
button2.setLabel("CE");
panel2.add(button2);
button3.setLabel("C");
button3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button3ActionPerformed(evt);
}
});
panel2.add(button3);
cmd.setLabel("save");
cmd.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdActionPerformed(evt);
}
});
panel2.add(cmd);
cmdd.setLabel("read");
cmdd.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmddActionPerformed(evt);
}
});
panel2.add(cmdd);
add(panel2);
panel3.setLayout(new java.awt.GridLayout(4, 4, 20, 10));
button4.setLabel("7");
button4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button4ActionPerformed(evt);
}
});
panel3.add(button4);
button5.setLabel("8");
button5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button5ActionPerformed(evt);
}
});
panel3.add(button5);
button6.setLabel("9");
button6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button6ActionPerformed(evt);
}
});
panel3.add(button6);
button7.setLabel("+");
button7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button7ActionPerformed(evt);
}
});
panel3.add(button7);
button8.setLabel("4");
button8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button8ActionPerformed(evt);
}
});
panel3.add(button8);
button9.setLabel("5");
button9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button9ActionPerformed(evt);
}
});
panel3.add(button9);
button10.setLabel("6");
button10.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button10ActionPerformed(evt);
}
});
panel3.add(button10);
button11.setLabel("-");
button11.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button11ActionPerformed(evt);
}
});
panel3.add(button11);
button12.setLabel("1");
button12.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button12ActionPerformed(evt);
}
});
panel3.add(button12);
button13.setLabel("2");
button13.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button13ActionPerformed(evt);
}
});
panel3.add(button13);
button14.setLabel("3");
button14.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button14ActionPerformed(evt);
}
});
panel3.add(button14);
button15.setLabel("*");
button15.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button15ActionPerformed(evt);
}
});
panel3.add(button15);
button16.setLabel("0");
button16.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -