Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2489

Re: Capturing event gener

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Steve W. Jackson" <steve.w..jackson@THRWHITE.remove-dii-this>
Subject Re: Capturing event gener
Message-ID <stevewjackson-71728B.11375119092007@individual.net> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <1190212627.827305.144140@d55g2000hsg.googlegroups.com>
References <1190212627.827305.144140@d55g2000hsg.googlegroups.com>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 34
Date Wed, 27 Apr 2011 15:39:25 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918765 96.60.20.240 (Wed, 27 Apr 2011 10:39:25 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:39:25 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:2489

Show key headers only | View raw


  To: comp.lang.java.gui
In article <1190212627.827305.144140@d55g2000hsg.googlegroups.com>,
 Chanchal <chanchal.jacob@gmail.com> wrote:

> 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

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.
-- 
Steve W. Jackson
Montgomery, Alabama

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Capturing event generated "Chanchal" <chanchal@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
  Re: Capturing event gener "Steve W. Jackson" <steve.w..jackson@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000

csiph-web