?? frame1.java~15~
字號(hào):
package simpleswing;import java.awt.*;import java.awt.event.*;import javax.swing.*;import com.borland.jbcl.layout.*;public class Frame1 extends JFrame { JPanel contentPane; JLabel jLabel1 = new JLabel(); XYLayout xYLayout1 = new XYLayout(); /**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(); jLabel1.setText("jLabel1"); jLabel1.setIcon(new ImageIcon(Frame1.class.getResource("BIGLAKE.GIF")));// jLabel1.setIcon(new ImageIcon(Frame1.class.getResource("BIGLAKE.GIF"))); jLabel1.setIconTextGap(15); contentPane.setLayout(xYLayout1); this.setSize(new Dimension(383, 252)); this.setTitle("SimpleSwing"); contentPane.add(jLabel1, new XYConstraints(3, 29, -1, -1)); } /**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); } }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -