📄 frame2.java~3~
字号:
package testsystem;
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2009</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class Frame2 extends JFrame {
JPanel contentPane;
JButton jButton1 = new JButton();
JTextField jTextField1 = new JTextField();
XYLayout xYLayout1 = new XYLayout();
public Frame2() {
try {
setDefaultCloseOperation(EXIT_ON_CLOSE);
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
/**
* Component initialization.
*
* @throws java.lang.Exception
*/
private void jbInit() throws Exception {
contentPane = (JPanel) getContentPane();
contentPane.setLayout(xYLayout1);
setSize(new Dimension(400, 300));
setTitle("Frame Title");
jButton1.setText("New ");
jButton1.addActionListener(new Frame2_jButton1_actionAdapter(this));
jTextField1.setText("jTextField1");
contentPane.add(jButton1, new XYConstraints(18, 88, -1, -1));
contentPane.add(jTextField1, new XYConstraints(152, 90, -1, -1));
}
public void jButton1_actionPerformed(ActionEvent e) {
System.exit(0);
}
}
class Frame2_jButton1_actionAdapter implements ActionListener {
private Frame2 adaptee;
Frame2_jButton1_actionAdapter(Frame2 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -