setVisible(true) a main window does nothing


Dear jucers,

In order to manage an application which mainly resides in the systray (Win and Linux) or in the extra menu (OSX), I’d like to show and hide its main window each time the user clicks on its icon.

I trigger the setVisible() method on the MainWindow object which inherits from DocumentWindow.

Using setVisible(false) hides perfectly the app window but setting setVisible(true) doesn’t show it.
What’s wrong ?



No idea… setVisible certainly works, otherwise nobody’s windows would ever appear. Best advice I can give is to do some debugging!


Sorry, I was just trying to set visible the wrong component.
It works, of course.