A possible solution is:
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
myFrame.toFront();
myFrame.repaint();
}
});
More Related Contents:
- How to resolve an Error on a constructor? [closed]
- Java and GUI – Where do ActionListeners belong according to MVC pattern?
- get width and height of JPanel outside of the class
- What does SwingUtilities.invokeLater do? [duplicate]
- Setting background color for a JFrame
- What is the difference between Swing and AWT?
- Swing GUI listeners without AWT
- Java Animate JLabel
- How to draw a tree representing a graph of connected nodes?
- How to define multiple JButton actions from a different class
- Zoom box for area around mouse location on screen [closed]
- java drag and drop
- Why are my items not showing up in JFrame?
- Get effective screen size from Java
- How to serialize Java 2D Shape objects as XML?
- Pacman open/close mouth animation
- How can a Swing WindowListener veto JFrame closing
- Java: mouseDragged and moving around in a graphical interface
- How to make AWT Button() and use ImageIcon(), Icon()?
- Porting a Java app that uses AWT and Swing for drawing movies to the server-side
- KeyListener vs. Key Bindings
- Mirroring animated gif on load in Java – ImageIcon
- JComponents disappearing after calling mouseClicked()
- Java: using an image as a button
- Java rotating non-square JPanel component
- How can I make this JButton visible? When I have progressive scan background JWindow()?
- How do I make a rectangle move across the screen with key bindings?
- Is this the correct way of using Java 2D Graphics API?
- Getting a HeadlessException: No X11 DISPLAY variable was set
- Add WebView control on Swing JFrame