Hi!
This might be a pretty stupid question but I will try it anyway...
Whenever I write a Swing-based application I use a class that extends JFrame and generate all Swing-components in the cunstrutor of this class.
Could someone please explain how Java handels this? Because I would expect that the application would close after the cunstructor was processed, but instead the frame stays and will not disappear until it is told to do so (ActionEvent, dispose(), whatever...).
I want to know this because I have some problem with a SSLsocket that is losing connection over and over again and I have the suspicion that this has something to do with the Swing stuff... or the threads I use.
Example: I open a socket in the JFrame cunstructor, call a method to draw all the Swing components and show a JDialog. In the actionPerformed-method I start a thread everytime a button is clicked and in this thread I want to use the socket that was opened in the constructor... but it is closed/not available.
Is there something I have to know regarding the life cycle of sockets?
thanx in advance
frag
patrick.metz@epost.de
This might be a pretty stupid question but I will try it anyway...
Whenever I write a Swing-based application I use a class that extends JFrame and generate all Swing-components in the cunstrutor of this class.
Could someone please explain how Java handels this? Because I would expect that the application would close after the cunstructor was processed, but instead the frame stays and will not disappear until it is told to do so (ActionEvent, dispose(), whatever...).
I want to know this because I have some problem with a SSLsocket that is losing connection over and over again and I have the suspicion that this has something to do with the Swing stuff... or the threads I use.
Example: I open a socket in the JFrame cunstructor, call a method to draw all the Swing components and show a JDialog. In the actionPerformed-method I start a thread everytime a button is clicked and in this thread I want to use the socket that was opened in the constructor... but it is closed/not available.
Is there something I have to know regarding the life cycle of sockets?
thanx in advance
frag
patrick.metz@epost.de