This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
Now all of this works when I run it by itself like as follows
However when it is brought up along with my GUI and another JWindow it just shows up as a white box.
Any ideas as to why it does this?
posted 8 years ago
and the fact that you call it in the askForPos() method is probably the cause of the problem. Basically, you're blocking the Event Dispatch thread, thus preventing the Window from repainting (or in your cause, painting for the first time). Even if it did paint successfully, it wouldn't be able to process any user input.
Better would be to not block at all, but to instead move the code that eventually disposes the Window (I assume you also want to setVisible(false) on it as well) to the actionPerformed() event handling code.
Dave Taubler<br />Specializing in <a href="http://taubler.com/articles/" target="_blank" rel="nofollow">Java and Web Development</a>