I have a swing GUI class Foo
and in the constructor of Foo
class, I load some values from the databases. Based on the returning values from database, I can say whether this GUI should be visible or not. However, when I say, this.setVisible(false);
inside the constructor of this GUI class, it has no effect because object creation is not completed.
How can I complete this task without user realizing the transition (disappearing of the GUI)?