aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JMenu Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JMenu Problem" Watch "JMenu Problem" New topic
Author

JMenu Problem

Cristian Torrealba
Greenhorn

Joined: Sep 21, 2000
Posts: 10
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
Scott Pedigo
Greenhorn

Joined: Feb 15, 2001
Posts: 15
So did you try putting a repaint() after the call which brings up the dialog to see if that would fix the problem?
seetha gupta
Greenhorn

Joined: Feb 12, 2001
Posts: 4
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMenu Problem
 
Similar Threads
Emin
help me out
Creating one class from another
help me out
JMenu problem