Tutorial by Examples

Like any other java program, every swing program starts with a main method. The main method is initiated by the main thread. However, Swing components need to be created and updated on the event dispatch thread (or short: EDT). To illustrate the dynamic between the main thread and the EDT take a loo...
import java.awt.EventQueue; import java.awt.GridLayout; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; import java.util.ArrayList; import java.util.List; import javax.swing.JFrame; import javax.swing.JTextArea; import javax.sw...

Page 1 of 1