• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMenu Problem

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i have a problem with JMenu. I have a JMenuItem called "new". If this item is selected a JFileChooser Dialog is launched. After selecting the file and pressing "open" the JMenu is still open and the "new" Item is selected. But that seems to be only the image that was not repainted or disabled, because I can�t select any items. Only if I press the Menu again, I can reproduce my steps. Does anybody know why it is so and how I can get rid of it?
Thanks in advance
Cristi�n
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So did you try putting a repaint() after the call which brings up the dialog to see if that would fix the problem?
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a solution for this. After you select the file dialog box, get the popup menu of the file menuitem and remove it explicitly, by giving setvisible(false). This works fine. Just try it out
reply
    Bookmark Topic Watch Topic
  • New Topic