private void ConnectJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ConnectJButtonActionPerformed
        String hstName;

        try {
            hstName = JOptionPane.showInputDialog(null, "Enter Hostname", "HostName Request", 1);

            userSocket = new Socket(hstName, 6666);
            out = new PrintWriter(userSocket.getOutputStream(), true);
            in = new BufferedReader(new InputStreamReader(userSocket.getInputStream()));
            MovieNameTextField.setEnabled(true);
            GenreTextField.setEnabled(true);
            MovieSearchButton.setEnabled(true);
            GenreSearchButton.setEnabled(true);
            DisconnectjButton.setEnabled(true);
            AdminMenuItem.setEnabled(true);
            ConnectJButton.setEnabled(false);
            JOptionPane.showMessageDialog(null, "Welcome", "Success!!", 1);
        } catch (NoRouteToHostException e) {
            JOptionPane.showMessageDialog(null, "Inccorect Hostname entered. \nPlease try again.", "Error", 0);
        } catch (UnknownHostException e) {
            JOptionPane.showMessageDialog(null, "Inccorect Hostname entered. \nPlease try again.", "Error", 0);
        } catch (IOException e) {
            JOptionPane.showMessageDialog(null, "The Server is not running. \nPlease try again.", "Error", 0);
        } catch (NullPointerException e) {
            JOptionPane.showMessageDialog(null, "The Server is not running. \nPlease try again.", "Error", 0);
        }
    }//GEN-LAST:event_ConnectJButtonActionPerformed