Any of those help Generally when you create a JDialog you specify a JFrame as the owner. This is so that when you click on the frame Icon on the task bar all the child dialogs can be displayed with the JFrame, otherwise there is no way to activate the dialog unless you minimize all other active windows on the desktop. If you truly want an independent JDialog then you need to specify your dialog as a child of another frame:
Does that help Your dialog is modal. So the setVisible(true) method call doesn't return until the dialog has been closed. So the timer is only created once the dialog is closed. You need to create it and start it before making the dialog visible.