// Experience suggests that one should avoid using weights when using the // GridBagLayout. I find that nonzero weights can cause layout bugs that are // hard to track down. [Jon Aquino] void jbInit() throws Exception { okCancelApplyPanel.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { okCancelApplyPanel_actionPerformed(e); } }); // LDB: set the default button for Enter to the OK for all this.getRootPane() .setDefaultButton(okCancelApplyPanel.getButton(I18N.get("ui.OKCancelPanel.ok"))); setMainComponent(); this.setResizable(true); this.getContentPane().add(dialogPanel, BorderLayout.CENTER); dialogPanel.add(infoPanel, BorderLayout.WEST); dialogPanel.add(mainComponent, BorderLayout.CENTER); dialogPanel.add(console, BorderLayout.SOUTH); console.setVisible(false); this.getContentPane().add(okCancelApplyPanel, BorderLayout.SOUTH); }
public void showConsole() { console.setVisible(true); pack(); }