📄 frame1.java~3~
字号:
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("http://news.sina.com.cn:80/index.html"); contentPane.setLayout(xYLayout1); this.setSize(new Dimension(400, 309)); this.setTitle("Frame Title"); jButton1.setText("查询网页信息"); jTextArea1.setText(" "); 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -