matha.java
来自「大阿斗大阿斗大阿斗大阿斗大阿斗大阿斗大阿斗大阿斗大阿斗大阿斗大阿斗大阿斗大阿斗大」· Java 代码 · 共 54 行
JAVA
54 行
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
class windouws extends JFrame implements ActionListener
{
private JButton b[];
private JTextField text;
public windouws(String s){
// setTile(s);
b =new JButton[15];
text=new JTextField();
FlowLayout flow=new FlowLayout();
flow.setAlignment(FlowLayout.LEFT);
flow .setHgap(3);
// flow.setVga(7);
add(text);
for(int i=0;i<10;i++)
{
b[i]=new JButton(""+i);
b[i].addActionListener(this);
add(b[i]);
}
b[10]=new JButton("+");
b[10].addActionListener(this);
b[11]=new JButton("-");
b[11].addActionListener(this);
b[12]=new JButton("*");
b[12].addActionListener(this);
b[13]=new JButton("/");
b[13].addActionListener(this);
b[14]=new JButton("=");
b[14].addActionListener(this);
validate();
setBounds(100,110,200,200);
setVisible(ture);
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
}
}
public class Matha{
public static void main(String args[]){
new Windouws("haha");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?