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


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

Re: Get frame reference

From "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Subject Re: Get frame reference
Message-ID <1172852502.858571.321180@8g2000cwh.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
References <8mXFh.90477$ff2.80185@fe02.news.easynews.com>
Date 2011-04-27 15:31 +0000
Organization TDS.net

Show all headers | 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


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