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


Groups > comp.lang.java.gui > #2584 > unrolled thread

Re: Component Focus

Started by"Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this>
First post2011-04-27 15:39 +0000
Last post2011-04-27 15:39 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.java.gui

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Component Focus "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000

#2584 — Re: Component Focus

From"Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this>
Date2011-04-27 15:39 +0000
SubjectRe: Component Focus
Message-ID<SrGdnVlZhskNWZ7anZ2dnUVZ_vHinZ2d@wavecable.com>
  To: comp.lang.java.gui,comp.l
Jason Cavett wrote:
> On Oct 3, 11:30 am, Daniel Pitts
> <newsgroup.spamfil...@virtualinfinity.net> wrote:
>> Jason Cavett wrote:
>>> Is there a way to track component focus across an entire GUI?  What I
>>> am trying to do is keep toolbars updated (by updating their
>>> corresponding actions) depending on what component is currently in
>>> focus.
>>> So...
>>> MainView - this is parent view that holds all project and
>>> propertyviews for my application.  MainView contains a method called
>>> "updateActions" which, when called, turns actions on and off depending
>>> on the current status of the application.
>>> What I'd like to have happen is that, when any focus change occurs,
>>> the updateActions method is called.  Everything I've tried so far is
>>> not accomplishing this.  Any insight provided would be much
>>> appreciated.
>>> Thanks
>> Has everything you've tried included adding a focus listener on all your
>> components?
>>
>> --
>> Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
> 
> My apologies for not adding that, no I haven't tried that method, but
> only due to the fact that it would be extremely time consuming for
> something that doesn't give a lot of return.  Also, considering the
> size of the application (incl. all JTextFields, JTrees, Panels, etc)
> this is something I'd like to do as a last resort.
> 
> Basically, I'm wondering if there's an easier way that I hadn't
> thought of.  If not, I can use the method you described or just not
> worry about it at all.
> 
> Thanks, though.
> 
Well, if you haven't actually tried listening to the focus, how have you 
tried to update on focus change?

-- 
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

---
 * 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

[toc] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web