frame1.java~2~
来自「JBuilder9 精髓 source code1.rar」· JAVA~2~ 代码 · 共 55 行
JAVA~2~
55 行
package urlconnection;import java.awt.*;import java.awt.event.*;import javax.swing.*;import com.borland.jbcl.layout.*;/** * <p>Title: an example</p> * <p>Description:an no</p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: home</p> * @author liujun * @version 1.0 */public class Frame1 extends JFrame { private JPanel contentPane; private XYLayout xYLayout1 = new XYLayout(); private JTextField jTextField1 = new JTextField(); private JButton jButton1 = new JButton(); private JTextArea jTextArea1 = new JTextArea(); //Construct the frame public Frame1() { enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]"))); contentPane = (JPanel) this.getContentPane(); jTextField1.setText("jTextField1"); contentPane.setLayout(xYLayout1); this.setSize(new Dimension(400, 300)); this.setTitle("Frame Title"); jButton1.setText("jButton1"); jTextArea1.setText("jTextArea1"); contentPane.add(jTextField1, new XYConstraints(17, 12, 222, 30)); contentPane.add(jTextArea1, new XYConstraints(10, 54, 380, 226)); contentPane.add(jButton1, new XYConstraints(269, 12, 109, 30)); } //Overridden so we can exit when window is closed protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { System.exit(0); } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?