public class OptionDialog extends JDialog {
...
public Insets getInsets() {
return new Insets(28, 10, 10, 10);
}
...
}
OptionDialog dlg = new OptionDialog();
dlg.pack();
dlg.setLocationRelativeTo(adaptee);
dlg.setSize(400, 400);
dlg.setVisible(true);
When the option dialog is shown, the inset area will not be painted,
i.e. the inset area looks same as
the parent pane of the option dialog.
But if I remove the getInsets method, the inset area will be painted.
Unfortunately, it is too small for me.
Pls help me.
Andrew Thompson - 01 Nov 2006 04:57 GMT
...
> But if I remove the getInsets method, the inset area will be painted.
> Unfortunately, it is too small for me.
Try a JPanel with an EmptyBorder, and..
> Pls help me.
Please spell words fully (we can afford the extra
bytes, this is not SMS) and try not to sound so
pathetic.
Also note there is a forum specialised to deal with
GUI matters, 'comp.lang.java.gui'.
Andrew T.