First mouse click confuses button in JDesktop

Sirs, I have the following scenary:



3D Scene + JMEDesktop with Swing panel that hide-shows some buttons and other Swing-components.


Well, everything goes well, I mean Swing goes well, when no hide-shows occur. But, when I do some "magic", hide some components, show some others, and viceversa, then, then THE NEXT FIRST MOUSE CLICK GOES WRONG. The mouse clicks not on the button that's over, but to other button on the JMEDesktop. JMEDesktop It's like confusing events between buttons, mixing them...

Let's imagine that after a "swing magic" (hide-show) you put two buttons on-screen, right and left button, well, you click on right, and the event goes to left button... only the first click... then, the next is ok.

So, it seems that during the first mouse event something is dirty inside JME-AWT and it clears up after this first event is passed. But the matter is this event is mixed between buttons.

Any idea how to solve this? somekind of refresh events on JME-AWT?  :?

Thank you.

Ok, calling desktop.updateRenderState() has solved the problem. But the matter is I have to call it for every swing mouse-click event, and that's a bit unconfortable. No other way to improve this?