Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

Why JDialog do not update its inset area?

Thread view: 
Allen - 01 Nov 2006 03:49 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.