JWindow in an ActionListener...
I got a JButton on a JFrame. When I click on the button, it pops a JWindow saying "Connecting...", then at the end of the actionPerformed, it disposes the JWindow. The problem is that the window does go visible at the beginning, but it only shows a gray box. It does the dispose before actually showing the "Connecting..." message. I put a sleep in between the setVisible and the dispose, and it seems it only shows up AT THE END of the actionPerformed method. Is there a way to make it show up when I invoke setVisible(true)? I tried repaint, I tried using a Thread to make it show up, nothing works.
Thanks for the help.

