How to modify an opened menu ?

Discussion in 'Java' started by Carsten Zerbst, Jun 5, 2005.

  1. Hello,

    I have a menu in my application which offers several connection options
    after doing a network lookup. The menu is currently build triggered by a
    JMenuLister. The lookup is typically slow and the menu will
    open with a noticable delay.

    I wanted to use the same method I use in the trees,
    * first display a string "Updating .." and start the query in another
    thread
    * remove the updating JMenuItem and replace by the real ones.

    This does work, but the opened menu (or better its JPopup) is not
    redrawn properly. Though I remove the updating item and add new
    ones in the AWT Event Thread, all new items are squezed together in the
    space of the former updating item :-(

    I experimented using something like menu.getPopup().validate
    but the opened menu is not drawn correct.

    Any tips appreciated, Carsten
     
    Carsten Zerbst, Jun 5, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roxanne
    Replies:
    0
    Views:
    1,237
    Roxanne
    Jul 4, 2003
  2. Tom Wild
    Replies:
    0
    Views:
    6,715
    Tom Wild
    Aug 14, 2003
  3. ACM
    Replies:
    4
    Views:
    492
    dorayme
    Aug 11, 2009
  4. Henry Wiz

    ASP modify pull down menu problem

    Henry Wiz, Apr 26, 2004, in forum: ASP General
    Replies:
    1
    Views:
    108
    Maarten
    Apr 26, 2004
  5. Peter Pippinger

    NB: Hiding Menu-Bars in an already opened Window.

    Peter Pippinger, Nov 19, 2004, in forum: Javascript
    Replies:
    0
    Views:
    86
    Peter Pippinger
    Nov 19, 2004
Loading...

Share This Page