After executing the frame created by Swing in the main, we want to display a new frame containing code related to the socket. However, when I do this, the program freezes. Any way?
For example, if I execute the login frame and log in with the administrator ID, I want to create a server socket, and in other cases, I want to create a client socket.
If the source related to the socket is executed directly from the main without going through the frame, communication between the server and the client succeeds.