Clicking the cancel button showInputDialogue
问题 I have a question in regards to pressing the cancel button of my inputDialoguebox. I have asked a similar question before so I apologize if I seem to repeat myself. The main problem I have is that my code executes regardless of me pressing cancel and a socket connection does get made even if I don't add any input. Why does this happen and how can I avoid this? String input = ""; try { InetAddress host = InetAddress.getLocalHost(); String hostAddress = host.getHostAddress(); //setting label to