Why JDialog do not update its inset area?

A

Allen

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.
 
A

Andrew Thompson

Allen wrote:
....
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,269
Messages
2,571,098
Members
48,773
Latest member
Kaybee

Latest Threads

Top