public class MouseAndKeyEvent {
private Frame f;
private Button but;
public MouseAndKeyEvent() {
init();
}
// 图形化界面
public void init() {
f = new Frame("my frame");
f.setBounds(300, 100, 600, 500);
f.setLayout(new FlowLayout());
but = new Button("my button");
f.add(but);