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

Tip: Looking for answers? Try searching our database.

Capturing event generated by JSplitPane

Thread view: 
Chanchal - 19 Sep 2007 15:37 GMT
Hi All,

i have a JFrame on which 4 JSplitPanes are nested. Each JSplitPane
other than the last one contains a JPanel and a nested JSplitPane. The
last one contains two JPanels. I need to capture the event when the
divider of JSplitPane is moved so that make some modification in the
contianed JPanel. Please advise on how this can be achieved.

Thanks in advance

Chanchal
Steve W. Jackson - 19 Sep 2007 17:37 GMT
> Hi All,
>
[quoted text clipped - 7 lines]
>
> Chanchal

Proper use of layout management should make it unnecessary for you to
care when a user moves a divider.

You might be able to add a ComponentListener on your panels to detect
when they are resized.  The obvious trouble with that, however, is that
moving the divider on any pane will probably cause some or all of the
others to get resized, thereby firing their own listeners.

You could also add a PropertyChangeListener to each split pane to detect
changes in the JSplitPane.DIVIDER_LOCATION_PROPERTY.
Signature

Steve W. Jackson
Montgomery, Alabama



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.