📄 caimin.java
字号:
import javax.swing.*;
import java.awt.*;
import javax.swing.border.*;
import java.awt.event.*;
class Cp extends Frame implements ActionListener
{
Box baseBox,box1;
Button Cmxx, Cmgp;
Cp(String s)
{ super(s);
box1=Box.createVerticalBox();
Cmxx=new Button("彩民个人信息");
box1.add(Cmxx);
box1.add(Box.createVerticalStrut(10));
Cmgp=new Button("彩民购票信息");
box1.add(Cmgp);
box1.add(Box.createVerticalStrut(10));
baseBox=Box.createHorizontalBox();
setBackground(Color.pink);
baseBox.add(box1);
baseBox.add(Box.createHorizontalStrut(10));
setLayout(new FlowLayout());
add(baseBox);
Cmxx.addActionListener(this);
Cmgp.addActionListener(this);
setBounds(150,200,250,180);
setLayout(new FlowLayout());
setBackground(Color.pink);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
setVisible(false);
}
});
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==Cmxx)
{L i=new L("彩民信息管理系统");
}
else if(e.getSource()==Cmgp)
{Gg u=new Gg("彩民购票信息系统");
}
}
}
public class Caimin
{ public static void main(String args[])
{
Cp caipiao=new Cp("彩民信息界面");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -