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 / August 2005

Tip: Looking for answers? Try searching our database.

Live layout of Swing windows

Thread view: 
Wes Harrison - 02 Aug 2005 11:35 GMT
I have seen Swing applications where they do what I call "live layout" and I
want to know how to do it in my application.  Live layout is where the
contents of a frame/window are laid-out continuously while the user resizes
the window by moving the resize border with the mouse.  This happens *while*
they have the mouse button pressed.  This is opposite to the way most Swing
applications (including mine) work where the laying out of contents is only
performed *after* the user releases the mouse button and not while the
actual window is being resized.

I am sure it must be something simple or even complex, it doesn't matter.
Most Windows programs work in this way and I want my Swing applications to
work in the same manner.

Does anyone know the method used to accommodate live layout?  Please don't
send me to a URL or ask me to RTFM; I've done the layout tutorial already
and now I just need some help.

Thanks,

Wes
Thomas Fritsch - 02 Aug 2005 13:23 GMT
> I have seen Swing applications where they do what I call "live layout" and I
> want to know how to do it in my application.  Live layout is where the
[quoted text clipped - 4 lines]
> performed *after* the user releases the mouse button and not while the
> actual window is being resized.
The technical term for this is "dynamic layout".

> I am sure it must be something simple or even complex, it doesn't matter.
> Most Windows programs work in this way and I want my Swing applications to
> work in the same manner.
>
> Does anyone know the method used to accommodate live layout?  Please don't
> send me to a URL or ask me to RTFM;
Well, in spite of your admonition I send you to this URL
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Toolkit.html#setDynamicLayout(b
oolean
)
and request you to read it. ;-)
Looks like
  Toolkit.getDefaultToolkit().setDynamicLayout(true);
is exactly what you want.

> I've done the layout tutorial already
> and now I just need some help.
>
> Thanks,
>
> Wes

Signature

"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')

Wes Harrison - 02 Aug 2005 13:51 GMT
> > I have seen Swing applications where they do what I call "live layout" and I
> > want to know how to do it in my application.  Live layout is where the
[quoted text clipped - 13 lines]
> > send me to a URL or ask me to RTFM;
> Well, in spite of your admonition I send you to this URL

http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Toolkit.html#setDynamicLayout(b
oolean
)
> and request you to read it. ;-)
> Looks like
>    Toolkit.getDefaultToolkit().setDynamicLayout(true);
> is exactly what you want.

Yes, that's it exactly!  I thought it would be something simple.  Thanks
very much.

Wes


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.