[Java lista] swing dialog meretenek automatizalasa
   
     Zsombor     
     gzsombor at gmail.com
       
    2007. Jan. 21., V, 23:40:14 CET
    
    
  
On 1/21/07, Auth Gábor <auth.gabor at javaforum.hu> wrote:
>
> HalihĂł!
>
> 2007. január 21. 12.50 dátummal Zidarics Zoltan ezt Ărta:
> > Hogy szoktak ezt csinalni a profik?
>
>   A NetBeans-ben lévő Free Design (vagy GroupLayout) tudja ezt.
> --
A NetBeans tudása kevéssé releváns a kérdésben.
Nálam müködik, amit leirtál. Mi más Nálad?
public class GridTest extends JDialog {
    private static final long serialVersionUID = 1L;
    private JPanel jContentPane = null;
    private JPanel jPanel = null;
    private JPanel jPanel1 = null;
    private JButton jButton = null;
    private JButton jButton1 = null;
    private JCheckBox jCheckBox = null;
    /**
     * This method initializes jPanel
     *
     * @return javax.swing.JPanel
     */
    private JPanel getJPanel() {
        if (jPanel == null) {
            jPanel = new JPanel();
            jPanel.setLayout(new GridBagLayout());
            jPanel.add(getJCheckBox(), new GridBagConstraints());
        }
        return jPanel;
    }
    /**
     * This method initializes jPanel1
     *
     * @return javax.swing.JPanel
     */
    private JPanel getJPanel1() {
        if (jPanel1 == null) {
            jPanel1 = new JPanel();
            jPanel1.setLayout(new GridBagLayout());
            jPanel1.add(getJButton(), new GridBagConstraints());
            jPanel1.add(getJButton1(), new GridBagConstraints());
        }
        return jPanel1;
    }
    /**
     * This method initializes jButton
     *
     * @return javax.swing.JButton
     */
    private JButton getJButton() {
        if (jButton == null) {
            jButton = new JButton();
            jButton.setText("Ok");
        }
        return jButton;
    }
    /**
     * This method initializes jButton1
     *
     * @return javax.swing.JButton
     */
    private JButton getJButton1() {
        if (jButton1 == null) {
            jButton1 = new JButton();
            jButton1.setText("Cancel");
        }
        return jButton1;
    }
    /**
     * This method initializes jCheckBox
     *
     * @return javax.swing.JCheckBox
     */
    private JCheckBox getJCheckBox() {
        if (jCheckBox == null) {
            jCheckBox = new JCheckBox();
            jCheckBox.setText("Hallo");
        }
        return jCheckBox;
    }
    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
    }
    /**
     * @param owner
     */
    public GridTest(Frame owner) {
        super(owner);
        initialize();
    }
    /**
     * This method initializes this
     *
     * @return void
     */
    private void initialize() {
        this.setSize(300, 200);
        this.setContentPane(getJContentPane());
    }
    /**
     * This method initializes jContentPane
     *
     * @return javax.swing.JPanel
     */
    private JPanel getJContentPane() {
        if (jContentPane == null) {
            jContentPane = new JPanel();
            jContentPane.setLayout(new BorderLayout());
            jContentPane.add(getJPanel(), BorderLayout.NORTH);
            jContentPane.add(getJPanel1(), BorderLayout.SOUTH);
        }
        return jContentPane;
    }
}
--------- következő rész ---------
Egy csatolt HTML állomány át lett konvertálva...
URL: http://javagrund.hu/pipermail/javalist/attachments/20070121/64b2f219/attachment.html 
    
    
További információk a(z) Javalist levelezőlistáról