-
Notifications
You must be signed in to change notification settings - Fork 0
InvokeLater
KS LIM edited this page Jun 25, 2021
·
1 revision
- We create an instance of our code example and make it visible on the screen.
Theinvokelater()
method places the application on the Swing Event Queue.
It is used to ensure that all UI updates are concurrency safe.
In other words, it is to prevent GUI from hanging in certain situations. - Class name = JdbcExample
public static void main(String[] args){
EventQueue.invokeLater(()->{
JdbcExample ex = new JdbcExample();
ex.setVisible(true);
});
}