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 / March 2007

Tip: Looking for answers? Try searching our database.

refresh gui?

Thread view: 
stinkinrich88@googlemail.com - 04 Mar 2007 15:49 GMT
Hello. Say I had a panel that had 6 JButtons on it and half way
through the program I changed it so that there were 8 buttons there,
how to I get the gui to refresh itself so that the button panel apears
normal rather than just a mess?

at the moment the only way I can do it is by resizing the frame a
little

thanks!
Liz - 04 Mar 2007 15:58 GMT
>Hello. Say I had a panel that had 6 JButtons on it and half way
>through the program I changed it so that there were 8 buttons there,
[quoted text clipped - 5 lines]
>
>thanks!

Try validate();

http://mindprod.com/jgloss/validate.html
stinkinrich88@googlemail.com - 04 Mar 2007 16:04 GMT
> >Hello. Say I had a panel that had 6 JButtons on it and half way
> >through the program I changed it so that there were 8 buttons there,
[quoted text clipped - 9 lines]
>
> http://mindprod.com/jgloss/validate.html

Perfect! thanks a lot!!
Knute Johnson - 04 Mar 2007 18:22 GMT
>>> Hello. Say I had a panel that had 6 JButtons on it and half way
>>> through the program I changed it so that there were 8 buttons there,
[quoted text clipped - 8 lines]
>
> Perfect! thanks a lot!!

That assumes that you won't have problems with your layout manager.  You
might have to call pack() as well.

Signature

Knute Johnson
email s/nospam/knute/



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.