demonulllayout.java

来自「精通NetBeans光盘源代码,很好很好的资料」· Java 代码 · 共 55 行

JAVA
55
字号
/*
 * DemoNullLayout.java
 *
 * Created on 2006年3月28日, 上午12:25
 */

package org.netbeans.swing.layoutmanager;

/**
 *
 * @author  boyingking
 */
public class DemoNullLayout extends javax.swing.JFrame {
    
    /** Creates new form DemoNullLayout */
    public DemoNullLayout() {
        initComponents();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jButton1 = new javax.swing.JButton();

        getContentPane().setLayout(null);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jButton1.setText("jButton1");
        getContentPane().add(jButton1);
        jButton1.setBounds(230, 90, 83, 25);

        pack();
    }// </editor-fold>//GEN-END:initComponents
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new DemoNullLayout().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    // End of variables declaration//GEN-END:variables
    
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?