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 / GUI / April 2005

Tip: Looking for answers? Try searching our database.

revalidate() vs. repaint()?

Thread view: 
Rene Ruppert - 28 Apr 2005 09:21 GMT
Hi,

do I interpret the docs correctly that validate(), invalidate() and
revalidate() are only useful if I use a layout manager?
I know: "ALWAYS use a layout manager" :-), but if I don't a repaint() should
be enough, or am I wrong?

Regards,

René
A. Bolmarcich - 28 Apr 2005 15:06 GMT
> Hi,
>
> do I interpret the docs correctly that validate(), invalidate() and
> revalidate() are only useful if I use a layout manager?
> I know: "ALWAYS use a layout manager" :-), but if I don't a repaint() should
> be enough, or am I wrong?

The validate(), invalidate(), and revalidate() methods are useful if an
extension of Container overrides its doLayout() method, say to do
something other than the default behavior of invoking the
layoutContainer(Container) method of the LayoutManager of the Container.

Using a custom Container that overrides its doLayout() method to
layout the Container is an alternative to using a custom LayoutManager.
Rene Ruppert - 28 Apr 2005 15:27 GMT
Hi,

> The validate(), invalidate(), and revalidate() methods are useful if an
> extension of Container overrides its doLayout() method, say to do
[quoted text clipped - 3 lines]
> Using a custom Container that overrides its doLayout() method to
> layout the Container is an alternative to using a custom LayoutManager.

So this means, if I use setLayout(null), re/in/validate() is of no use,
correct?

René
A. Bolmarcich - 28 Apr 2005 19:05 GMT
> Hi,
>
[quoted text clipped - 8 lines]
> So this means, if I use setLayout(null), re/in/validate() is of no use,
> correct?

Whether it is of use depends on whether the doLayout() method has been
overridden to do something even when the LayoutManager is null.


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.