stefanie ohm wrote:In VB we have shown_form() where
you can do everything when the window becomes visible. I do not think that we have got something equivalent in Java.
It's there, and it uses the same principle as VB does - using event handlers. The thing is, in Java you have to attach event listeners to user interface objects. In this case it would be a java.awt.event.WindowListener (windowOpened), or possibly a java.awt.event.ComponentListener (componentShown).
Is it possible to stop the thread which goes to system.out.println...(go to system.out.println...) ?
Like I said, in AWT and Swing, all code in the main method, as well as in event handlers, will continue to run until either the method ends, or until a modal dialog is shown (e.g. using JOptionPane). In case of a modal dialog, the method will continue as soon as the modal dialog is disposed (closed).