计算机学院都编程代码
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Button;
import java.awt.TextField;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JButton;
public class ddd extends JFrame {
    private JPanel contentPane;
    private String a1="";
    private int data1;
    private String a2="";
    private int data2;
    private int opt;
    TextField textField = new TextField();
    Button button = new Button("0");
    Button button_1 = new Button("1");
    Button button_2 = new Button("2");
    Button button_3 = new Button("3");
    Button button_4 = new Button("4");
    Button button_5 = new Button("5");
    Button button_6 = new Button("6");
    Button button_7 = new Button("7");
    Button button_8 = new Button("8");
    Button button_9 = new Button("9");
    Button button_11 = new Button("-");
    Button button_12 = new Button("*");
    Button button_13 = new Button("/");
    Button button_14 = new Button("=");
    private final Button button_15 = new Button("+");
   
    /**
    * Launch the application.
    */
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {计算机编程工资多少
                    ddd frame = new ddd();
                    frame.setVisible(true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }
    /**
    * Create the frame.
    */
    public ddd() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setBounds(100, 100, 450, 300);
        contentPane = new JPanel();
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
        setContentPane(contentPane);
        contentPane.setLayout(null);
       
       
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
            a1=ActionCommand();
            textField.setText(a1);

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。