choi.java
来自「用java编写的一些初级代码」· Java 代码 · 共 33 行
JAVA
33 行
import java.awt.*;
import java.awt.event.*;
public class Choi
{
Choice ch=new Choice();
public static void main(String [] args)
{
new Choi().init();
}
public void init()
{
ch.add("cb1");
ch.add("cb2");
ch.add("cb3");
Frame f= new Frame ("TeChoi");
FlowLayout fl=new FlowLayout();
f.setLayout(fl);
f.add(ch);
f.setBounds(0,0,200,200);
f.setVisible(true);
f.addWindowListener(new WindowAdapter (){
public void windowClosing (WindowEvent e)
{
e.getWindow().setVisible(false);
((Window)e.getComponent()).dispose();
System.exit(0);
}
}
);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?