Set dynamic JLabel text in a JDialog by timer
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 second). the thing is , when im debugging it - it's stops right after the "dia.setVisible(true);" , and will not proceed unless i will close the JDialog . is there any possible way of fixing it? Thanks. Take a look at the code : @Override public void run() { dia = new JDialog(parentDialog, true); dia.setLocationRelativeTo(parentFrame); String text = "Text "; dia.setSize(300, 150); jl = new JLabel(text); dia.getContentPane().add