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


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

Re: Get frame reference

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!novia!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Subject Re: Get frame reference
Message-ID <1172852502.858571.321180@8g2000cwh.googlegroups.com> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <8mXFh.90477$ff2.80185@fe02.news.easynews.com>
References <8mXFh.90477$ff2.80185@fe02.news.easynews.com>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 21
Date Wed, 27 Apr 2011 15:31:17 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918277 96.60.20.240 (Wed, 27 Apr 2011 10:31:17 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:31:17 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:1084

Show key headers only | View raw


  To: comp.lang.java.gui
On Mar 3, 2:25 am, "Tony B" <tag...@yahoo.co.uk> wrote:
> In a simple gui application, I'm writing some code in which I'm using
> JOptionPane to display messages in various parts of the code.
..
> Ideally what I'm trying to do is identify the parentComponent for the main
> gui application
..
> window ? Is this possible ?

Component has a getParent() method.
Keep calling that in a loop till the
call returns a null component, and you
should have the root component.

Andrew T.

---
 * 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 | Next in thread | Find similar | Unroll thread


Thread

Get frame reference "Tony B" <tony.b@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
  Re: Get frame reference "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
    Re: Get frame reference "Rogan Dawes" <rogan.dawes@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
      Re: Get frame reference "Tony B" <tony.b@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
      Re: Get frame reference "Michael Rauscher" <michael.rauscher@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000

csiph-web