0

I have a JFrame with a JMenuBar, inside the JFrame there is a JPanel (the panel occupies all the space but the menu bar). The thing is that when I have the mouse over some MenuItem and move the mouse to the JPanel and do click, the menu should retract (I mean when you select in a menu for ex. File, it shows the submenu and when you move the mouse to another place of the window and do click the submenu hides/retract).

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
EricJ
  • 131
  • 3
  • 13
  • I tried, but could not reproduce your problem. Could you perhaps show the code? Or make a quick short new JMenuBar project that has the same issue and post that code? (although, trying to reproduce an error in a small example can sometimes help to find some errors yourself) – incomudro May 24 '13 at 11:55
  • You could be mixing heavy and light weight components... – MadProgrammer May 24 '13 at 13:08
  • As MadProgrammer said. I once had the same problem when using Swing and SWT togeteher. When I went from one GUI framework to the other GUI framework, no message was sent to the first framework that it no longer had focus. – incomudro May 24 '13 at 13:14
  • A picture doesn't help us. You need to post a [SSCCE](http://sscce.org/). – camickr May 24 '13 at 14:38
  • Sorry, it was due to the setLookAndFeel,it is solved now. Thx to all! – EricJ May 24 '13 at 19:33

0 Answers0