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


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

Re: Singletons and Swing

Started by"Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this>
First post2011-04-27 15:43 +0000
Last post2011-04-27 15:43 +0000
Articles 7 — 4 participants

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: Singletons and Swing "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
    Re: Singletons and Swing "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
      Re: Singletons and Swing "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
        Re: Singletons and Swing "Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
          Re: Singletons and Swing "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
            Re: Singletons and Swing "tar" <tar@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
              Re: Singletons and Swing "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000

#3167 — Re: Singletons and Swing

From"Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this>
Date2011-04-27 15:43 +0000
SubjectRe: Singletons and Swing
Message-ID<8c87e88d-9157-4a37-bbc6-91a1acfbc023@e10g2000prf.googlegroups.com>
  To: comp.lang.java.programmer
On Feb 15, 12:16 am, Jason Cavett <jason.cav...@gmail.com> wrote:
> On Feb 14, 10:16 pm, Daniel Pitts
>
>
>
> <newsgroup.spamfil...@virtualinfinity.net> wrote:
> > Jason Cavett wrote:
> > > I am attempting to design a menu system for an application I am
> > > writing.  In it, I want an InsertMenu that exists within multiple
> > > different menus.  Currently, I am attempting to do this by making the
> > > InsertMenu a singleton.  This is causing a weird issue.
>
> > > I currently have two menus that hold the InsertMenu - a MainMenu and a
> > > TreePopupMenu.  The InsertMenu should be contained within both of
> > > those.  However, it seems as though it can only be in one menu at a
> > > time.  For example, if the TreePopupMenu has been created (which
> > > happens after I've opened up a new project), the InsertMenu completely
> > > disappears (with no errors or warnings) from the MainMenu.
>
> > > Is it possible to accomplish what I'm trying to do?
>
> > > Here is how I am creating my InsertMenu singleton.  Could this be the
> > > problem?  Thanks.
>
> > [snip...]
> > In stead of sharing a menu-item instance, its common to share an Action
> > instance.  Often the best way to do that is to extend AbstractAction.
>
> > The problem that you're seeing is that most swing components (including
> > JMenus, JMenuItems, etc...) know about their parent. If they are added
> > to a different container, they remove themselves from there other parent.
>
> > The other approach could be to have a simple method that constructs this
> > menu in a certain other menu (think createInsertMenu(mainMenuBar);).
>
> > it is still desirable to share Action instances (they share "disabled"
> > flags and icons and such).
>
> > Anyway, hope this helps,
> > Daniel.
>
> > --
> > Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
>
> Hmmm...that is a good suggestion.
>
> The reason I didn't originally do it is because I wanted to create the
> menus on the fly.  But after looking at the action classes, I realized
> that you can "control" the menus via the actions (L&F, icons, etc).
>
> I'm going to have to look more closely at this.
>
> Thanks.

Alright.  My coworker and I came up with a good solution that solves
the issue and gives us context sensitive menus.

Basically, we made InsertMenu *not* a singleton and, instead,
overwrote JMenuItem so that, when it is enabled or disabled, it is
also set visible/invisible, respectively (overwrote "setEnabled" and
"setVisible" so they stay consistent).  That way, when the Action (we
have an ActionFactory) is enabled or disable, it will carry over to
our JMenuItem.

It works beautifully and is much better than having a Singleton of the
InsertMenu.

Thanks for the help.  :-)

---
 * 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] | [next] | [standalone]


#3168

From"Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this>
Date2011-04-27 15:43 +0000
Message-ID<47b5f2fa$0$2474$7836cce5@newsrazor.net>
In reply to#3167
  To: comp.lang.java.programmer
Jason Cavett wrote:
> On Feb 15, 12:16 am, Jason Cavett <jason.cav...@gmail.com> wrote:
>> On Feb 14, 10:16 pm, Daniel Pitts
>>
>>
>>
>> <newsgroup.spamfil...@virtualinfinity.net> wrote:
>>> Jason Cavett wrote:
>>>> I am attempting to design a menu system for an application I am
>>>> writing.  In it, I want an InsertMenu that exists within multiple
>>>> different menus.  Currently, I am attempting to do this by making the
>>>> InsertMenu a singleton.  This is causing a weird issue.
>>>> I currently have two menus that hold the InsertMenu - a MainMenu and a
>>>> TreePopupMenu.  The InsertMenu should be contained within both of
>>>> those.  However, it seems as though it can only be in one menu at a
>>>> time.  For example, if the TreePopupMenu has been created (which
>>>> happens after I've opened up a new project), the InsertMenu completely
>>>> disappears (with no errors or warnings) from the MainMenu.
>>>> Is it possible to accomplish what I'm trying to do?
>>>> Here is how I am creating my InsertMenu singleton.  Could this be the
>>>> problem?  Thanks.
>>> [snip...]
>>> In stead of sharing a menu-item instance, its common to share an Action
>>> instance.  Often the best way to do that is to extend AbstractAction.
>>> The problem that you're seeing is that most swing components (including
>>> JMenus, JMenuItems, etc...) know about their parent. If they are added
>>> to a different container, they remove themselves from there other parent.
>>> The other approach could be to have a simple method that constructs this
>>> menu in a certain other menu (think createInsertMenu(mainMenuBar);).
>>> it is still desirable to share Action instances (they share "disabled"
>>> flags and icons and such).
>>> Anyway, hope this helps,
>>> Daniel.
>>> --
>>> Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
>> Hmmm...that is a good suggestion.
>>
>> The reason I didn't originally do it is because I wanted to create the
>> menus on the fly.  But after looking at the action classes, I realized
>> that you can "control" the menus via the actions (L&F, icons, etc).
>>
>> I'm going to have to look more closely at this.
>>
>> Thanks.
> 
> Alright.  My coworker and I came up with a good solution that solves
> the issue and gives us context sensitive menus.
> 
> Basically, we made InsertMenu *not* a singleton and, instead,
> overwrote JMenuItem so that, when it is enabled or disabled, it is
> also set visible/invisible, respectively (overwrote "setEnabled" and
> "setVisible" so they stay consistent).  That way, when the Action (we
> have an ActionFactory) is enabled or disable, it will carry over to
> our JMenuItem.
> 
> It works beautifully and is much better than having a Singleton of the
> InsertMenu.
> 
> Thanks for the help.  :-)
Just a hint, it is often (not always) better to show that the item is 
still there, just not available. Hiding (rearranging) menus in any way 
often leads to user confusion.

-- 
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] | [prev] | [next] | [standalone]


#3171

From"Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this>
Date2011-04-27 15:43 +0000
Message-ID<af46378e-5377-4793-99ad-7ce9104d722a@e60g2000hsh.googlegroups.com>
In reply to#3168
  To: comp.lang.java.programmer
On Feb 15, 3:15 pm, Daniel Pitts
<newsgroup.spamfil...@virtualinfinity.net> wrote:
> Jason Cavett wrote:
> > On Feb 15, 12:16 am, Jason Cavett <jason.cav...@gmail.com> wrote:
> >> On Feb 14, 10:16 pm, Daniel Pitts
>
> >> <newsgroup.spamfil...@virtualinfinity.net> wrote:
> >>> Jason Cavett wrote:
> >>>> I am attempting to design a menu system for an application I am
> >>>> writing.  In it, I want an InsertMenu that exists within multiple
> >>>> different menus.  Currently, I am attempting to do this by making the
> >>>> InsertMenu a singleton.  This is causing a weird issue.
> >>>> I currently have two menus that hold the InsertMenu - a MainMenu and a
> >>>> TreePopupMenu.  The InsertMenu should be contained within both of
> >>>> those.  However, it seems as though it can only be in one menu at a
> >>>> time.  For example, if the TreePopupMenu has been created (which
> >>>> happens after I've opened up a new project), the InsertMenu completely
> >>>> disappears (with no errors or warnings) from the MainMenu.
> >>>> Is it possible to accomplish what I'm trying to do?
> >>>> Here is how I am creating my InsertMenu singleton.  Could this be the
> >>>> problem?  Thanks.
> >>> [snip...]
> >>> In stead of sharing a menu-item instance, its common to share an Action
> >>> instance.  Often the best way to do that is to extend AbstractAction.
> >>> The problem that you're seeing is that most swing components (including
> >>> JMenus, JMenuItems, etc...) know about their parent. If they are added
> >>> to a different container, they remove themselves from there other parent.
> >>> The other approach could be to have a simple method that constructs this
> >>> menu in a certain other menu (think createInsertMenu(mainMenuBar);).
> >>> it is still desirable to share Action instances (they share "disabled"
> >>> flags and icons and such).
> >>> Anyway, hope this helps,
> >>> Daniel.
> >>> --
> >>> Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
> >> Hmmm...that is a good suggestion.
>
> >> The reason I didn't originally do it is because I wanted to create the
> >> menus on the fly.  But after looking at the action classes, I realized
> >> that you can "control" the menus via the actions (L&F, icons, etc).
>
> >> I'm going to have to look more closely at this.
>
> >> Thanks.
>
> > Alright.  My coworker and I came up with a good solution that solves
> > the issue and gives us context sensitive menus.
>
> > Basically, we made InsertMenu *not* a singleton and, instead,
> > overwrote JMenuItem so that, when it is enabled or disabled, it is
> > also set visible/invisible, respectively (overwrote "setEnabled" and
> > "setVisible" so they stay consistent).  That way, when the Action (we
> > have an ActionFactory) is enabled or disable, it will carry over to
> > our JMenuItem.
>
> > It works beautifully and is much better than having a Singleton of the
> > InsertMenu.
>
> > Thanks for the help.  :-)
>
> Just a hint, it is often (not always) better to show that the item is
> still there, just not available. Hiding (rearranging) menus in any way
> often leads to user confusion.
>
> --
> Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

That's a good point - not something I thought of.

As an argument, though (and, of course, there's no way you could have
known this about my application), hiding the menu items that aren't
available keeps the menu list from becoming exceptionally long which
requires the user to search through a list of items.

Either way, I will make sure I do some usability testing before I make
the context sensitive menus live.


Thanks!

---
 * 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] | [prev] | [next] | [standalone]


#3172

From"Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this>
Date2011-04-27 15:43 +0000
Message-ID<sfak85-qe7.ln1@zoogz.gregorie.org>
In reply to#3171
  To: comp.lang.java.programmer
Jason Cavett wrote:
> On Feb 15, 3:15 pm, Daniel Pitts
> <newsgroup.spamfil...@virtualinfinity.net> wrote:
>> Jason Cavett wrote:
>>> On Feb 15, 12:16 am, Jason Cavett <jason.cav...@gmail.com> wrote:
>>>> On Feb 14, 10:16 pm, Daniel Pitts
>>>> <newsgroup.spamfil...@virtualinfinity.net> wrote:
>>>>> Jason Cavett wrote:
>>>>>> I am attempting to design a menu system for an application I am
>>>>>> writing.  In it, I want an InsertMenu that exists within multiple
>>>>>> different menus.  Currently, I am attempting to do this by making the
>>>>>> InsertMenu a singleton.  This is causing a weird issue.
>>>>>> I currently have two menus that hold the InsertMenu - a MainMenu and a
>>>>>> TreePopupMenu.  The InsertMenu should be contained within both of
>>>>>> those.  However, it seems as though it can only be in one menu at a
>>>>>> time.  For example, if the TreePopupMenu has been created (which
>>>>>> happens after I've opened up a new project), the InsertMenu completely
>>>>>> disappears (with no errors or warnings) from the MainMenu.
>>>>>> Is it possible to accomplish what I'm trying to do?
>>>>>> Here is how I am creating my InsertMenu singleton.  Could this be the
>>>>>> problem?  Thanks.
>>>>> [snip...]
>>>>> In stead of sharing a menu-item instance, its common to share an Action
>>>>> instance.  Often the best way to do that is to extend AbstractAction.
>>>>> The problem that you're seeing is that most swing components (including
>>>>> JMenus, JMenuItems, etc...) know about their parent. If they are added
>>>>> to a different container, they remove themselves from there other parent.
>>>>> The other approach could be to have a simple method that constructs this
>>>>> menu in a certain other menu (think createInsertMenu(mainMenuBar);).
>>>>> it is still desirable to share Action instances (they share "disabled"
>>>>> flags and icons and such).
>>>>> Anyway, hope this helps,
>>>>> Daniel.
>>>>> --
>>>>> Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
>>>> Hmmm...that is a good suggestion.
>>>> The reason I didn't originally do it is because I wanted to create the
>>>> menus on the fly.  But after looking at the action classes, I realized
>>>> that you can "control" the menus via the actions (L&F, icons, etc).
>>>> I'm going to have to look more closely at this.
>>>> Thanks.
>>> Alright.  My coworker and I came up with a good solution that solves
>>> the issue and gives us context sensitive menus.
>>> Basically, we made InsertMenu *not* a singleton and, instead,
>>> overwrote JMenuItem so that, when it is enabled or disabled, it is
>>> also set visible/invisible, respectively (overwrote "setEnabled" and
>>> "setVisible" so they stay consistent).  That way, when the Action (we
>>> have an ActionFactory) is enabled or disable, it will carry over to
>>> our JMenuItem.
>>> It works beautifully and is much better than having a Singleton of the
>>> InsertMenu.
>>> Thanks for the help.  :-)
>> Just a hint, it is often (not always) better to show that the item is
>> still there, just not available. Hiding (rearranging) menus in any way
>> often leads to user confusion.
>>
>> --
>> Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
> 
> That's a good point - not something I thought of.
> 
> As an argument, though (and, of course, there's no way you could have
> known this about my application), hiding the menu items that aren't
> available keeps the menu list from becoming exceptionally long which
> requires the user to search through a list of items.
> 
> Either way, I will make sure I do some usability testing before I make
> the context sensitive menus live.
>
IMO there are two sides to this question: you need to consider both the 
access rights of the signed-on user and the immediate context:

Access rights: never show a user any menu item he doesn't have the 
rights to use.

Context: always show the user all the menu items he;s entitled to use, 
but grey out the ones that are not valid in the current context.

Applying these two rules keeps the menu sizes under control and, equally 
important, a given user always sees the same items in every menu, but 
can't use those that are illogical and/or inappropriate in the immediate 
context.

The same rules should also apply to buttons.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

---
 * 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] | [prev] | [next] | [standalone]


#3176

From"Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this>
Date2011-04-27 15:43 +0000
Message-ID<4dd519f9-af52-4f64-ab34-8ecf1fc91729@e23g2000prf.googlegroups.com>
In reply to#3172
  To: comp.lang.java.programmer
On Feb 16, 7:07 pm, Martin Gregorie <mar...@see.sig.for.address>
wrote:
> Jason Cavett wrote:
> > On Feb 15, 3:15 pm, Daniel Pitts
> > <newsgroup.spamfil...@virtualinfinity.net> wrote:
> >> Jason Cavett wrote:
> >>> On Feb 15, 12:16 am, Jason Cavett <jason.cav...@gmail.com> wrote:
> >>>> On Feb 14, 10:16 pm, Daniel Pitts
> >>>> <newsgroup.spamfil...@virtualinfinity.net> wrote:
> >>>>> Jason Cavett wrote:
> >>>>>> I am attempting to design a menu system for an application I am
> >>>>>> writing.  In it, I want an InsertMenu that exists within multiple
> >>>>>> different menus.  Currently, I am attempting to do this by making the
> >>>>>> InsertMenu a singleton.  This is causing a weird issue.
> >>>>>> I currently have two menus that hold the InsertMenu - a MainMenu and a
> >>>>>> TreePopupMenu.  The InsertMenu should be contained within both of
> >>>>>> those.  However, it seems as though it can only be in one menu at a
> >>>>>> time.  For example, if the TreePopupMenu has been created (which
> >>>>>> happens after I've opened up a new project), the InsertMenu completely
> >>>>>> disappears (with no errors or warnings) from the MainMenu.
> >>>>>> Is it possible to accomplish what I'm trying to do?
> >>>>>> Here is how I am creating my InsertMenu singleton.  Could this be the
> >>>>>> problem?  Thanks.
> >>>>> [snip...]
> >>>>> In stead of sharing a menu-item instance, its common to share an Action
> >>>>> instance.  Often the best way to do that is to extend AbstractAction.
> >>>>> The problem that you're seeing is that most swing components (including
> >>>>> JMenus, JMenuItems, etc...) know about their parent. If they are added
> >>>>> to a different container, they remove themselves from there other parent.
> >>>>> The other approach could be to have a simple method that constructs this
> >>>>> menu in a certain other menu (think createInsertMenu(mainMenuBar);).
> >>>>> it is still desirable to share Action instances (they share "disabled"
> >>>>> flags and icons and such).
> >>>>> Anyway, hope this helps,
> >>>>> Daniel.
> >>>>> --
> >>>>> Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
> >>>> Hmmm...that is a good suggestion.
> >>>> The reason I didn't originally do it is because I wanted to create the
> >>>> menus on the fly.  But after looking at the action classes, I realized
> >>>> that you can "control" the menus via the actions (L&F, icons, etc).
> >>>> I'm going to have to look more closely at this.
> >>>> Thanks.
> >>> Alright.  My coworker and I came up with a good solution that solves
> >>> the issue and gives us context sensitive menus.
> >>> Basically, we made InsertMenu *not* a singleton and, instead,
> >>> overwrote JMenuItem so that, when it is enabled or disabled, it is
> >>> also set visible/invisible, respectively (overwrote "setEnabled" and
> >>> "setVisible" so they stay consistent).  That way, when the Action (we
> >>> have an ActionFactory) is enabled or disable, it will carry over to
> >>> our JMenuItem.
> >>> It works beautifully and is much better than having a Singleton of the
> >>> InsertMenu.
> >>> Thanks for the help.  :-)
> >> Just a hint, it is often (not always) better to show that the item is
> >> still there, just not available. Hiding (rearranging) menus in any way
> >> often leads to user confusion.
>
> >> --
> >> Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
>
> > That's a good point - not something I thought of.
>
> > As an argument, though (and, of course, there's no way you could have
> > known this about my application), hiding the menu items that aren't
> > available keeps the menu list from becoming exceptionally long which
> > requires the user to search through a list of items.
>
> > Either way, I will make sure I do some usability testing before I make
> > the context sensitive menus live.
>
> IMO there are two sides to this question: you need to consider both the
> access rights of the signed-on user and the immediate context:
>
> Access rights: never show a user any menu item he doesn't have the
> rights to use.
>
> Context: always show the user all the menu items he;s entitled to use,
> but grey out the ones that are not valid in the current context.
>
> Applying these two rules keeps the menu sizes under control and, equally
> important, a given user always sees the same items in every menu, but
> can't use those that are illogical and/or inappropriate in the immediate
> context.
>
> The same rules should also apply to buttons.
>
> --
> martin@   | Martin Gregorie
> gregorie. | Essex, UK
> org       |

Normally I'd agree with you, but the problem at hand doesn't seem to
apply here.

Basically, within my application, users are creating trees.  However,
only certain nodes can have certain parents.  Additionally, there are
many different types of nodes.  If I just gray out the ones they don't
need, they still have a huge list to search through when, instead, if
I hide the ones they don't need, they only have 3 or 4, max.

Is there possibly another way to approach this that I haven't thought
of?  Thanks.

---
 * 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] | [prev] | [next] | [standalone]


#3178

From"tar" <tar@THRWHITE.remove-dii-this>
Date2011-04-27 15:43 +0000
Message-ID<ymi63wkzwu6.fsf@blackcat.isi.edu>
In reply to#3176
  To: comp.lang.java.programmer
Jason Cavett <jason.cavett@gmail.com> writes:

> Basically, within my application, users are creating trees.  However,
> only certain nodes can have certain parents.  Additionally, there are
> many different types of nodes.  If I just gray out the ones they don't
> need, they still have a huge list to search through when, instead, if
> I hide the ones they don't need, they only have 3 or 4, max.
> 
> Is there possibly another way to approach this that I haven't thought
> of?  Thanks.

Perhaps the answer is to make the context menus appear as pop-up menus
on the nodes that are being manipulated.  Since the menu is a pop-up,
users are (by now) used to it being contextual, and only showing the
allowed operations.

The fact that it only appears when summoned (traditionally by
right-click or control-click), means that it doesn't have the same
psychological permanence of menu bar menus -- and thus has a lower
expectation of always being the same.


-- 
Thomas A. Russ,  USC/Information Sciences Institute

---
 * 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] | [prev] | [next] | [standalone]


#3182

From"Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this>
Date2011-04-27 15:43 +0000
Message-ID<bf2ab7c6-a7ec-4023-bab7-f2b06cb50809@n58g2000hsf.googlegroups.com>
In reply to#3178
  To: comp.lang.java.programmer
On Feb 19, 12:21 pm, t...@sevak.isi.edu (Thomas A. Russ) wrote:
> Jason Cavett <jason.cav...@gmail.com> writes:
> > Basically, within my application, users are creating trees.  However,
> > only certain nodes can have certain parents.  Additionally, there are
> > many different types of nodes.  If I just gray out the ones they don't
> > need, they still have a huge list to search through when, instead, if
> > I hide the ones they don't need, they only have 3 or 4, max.
>
> > Is there possibly another way to approach this that I haven't thought
> > of?  Thanks.
>
> Perhaps the answer is to make the context menus appear as pop-up menus
> on the nodes that are being manipulated.  Since the menu is a pop-up,
> users are (by now) used to it being contextual, and only showing the
> allowed operations.
>
> The fact that it only appears when summoned (traditionally by
> right-click or control-click), means that it doesn't have the same
> psychological permanence of menu bar menus -- and thus has a lower
> expectation of always being the same.
>
> --
> Thomas A. Russ,  USC/Information Sciences Institute

Actually, this is exactly what I am doing.  The menu comes up only in
the tree when the user right clicks on a specific node.  That's why I
didn't mind the menu not being "permanent."

---
 * 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] | [prev] | [standalone]


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


csiph-web