The JMenuItems
of JMenuBar
drops down to a JPanel
added to the JFrame, but the JPanel erases the JMenuItems
.
Do I supposed to pause the re-drawing of the JPanel?
I'm using getGraphics()
on the JPanel
for drawing an image, this method is called from a thread with (for example) 200 ms delay.
edit:
It's a (very simple) game inside the JPanel
.
(I've added a field paused
to the JPanel and i've edited the paint method so it repaints the JPanel
only if paused
is false
, however I don't know if this "solution" is good. (It's set to true
when the user clicks on the menu and set to false
when selects or cancels it.)