Im trying to make a JDialog that will show the user a dynamic message on a JLabel. The message should be a count from 1 to 10 (and it should be changing a number every secon
don't use Thread.sleep(int) for Swing GUI, caused freeze of untill Thread.sleep(int) ended
Thread.sleep(int)
use Swing Timer instead of locking Swing GUI by usage of Thread.sleep(int)
Swing Timer
don't use dia.setSize(300, 150), learn how LayoutManager works
dia.setSize(300, 150)
LayoutManager