-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.2.0
-
sparc
-
solaris_2.6
Name: rk38400 Date: 05/13/98
Callling the pack method on a JDialog has no effect.
The JDialog will take up the whole screen size (it works properly on Win 95).
Example:
public class ExampleDialog extends JDialog {
private GridLayout gridbag;
private JButton done;
private JPanel jPanel;
public ExampleDialog(JFrame topFrame, String title, int x, int y) {
super(topFrame, title, true);
// Create panel to add all the components.
jPanel = new JPanel();
jPanel.setLayout(gridbag = new GridLayout());
// Add button to dialog box and add button listener.
done = new JButton("Ok");
done.addActionListener(this);
done.setBorder(BorderFactory.createEtchedBorder());
done.setPreferredSize(new Dimension(45, 25));
jPanel.add(done);
getContentPane().add(jPanel);
setLocation(x, y);
setResizable(false);
pack();
show();
}
}
No error message.
No trace info.
Solaris 2.6
(Review ID: 29724)
======================================================================
- duplicates
-
JDK-4041679 Setting dialog nonresizable before pack causes a ridiculous dialog size
-
- Closed
-