Chat: (dialog) refactor Exception handler, edit javadoc
authorEddie <dev@fun2be.me>
Sat, 6 Jun 2015 10:45:01 +0000 (11:45 +0100)
committerEddie <dev@fun2be.me>
Sat, 6 Jun 2015 10:45:01 +0000 (11:45 +0100)
src/uk/ac/ntu/n0521366/wsyd/client/Chat.java

index 55e699b..add625d 100644 (file)
@@ -6,13 +6,16 @@
 package uk.ac.ntu.n0521366.wsyd.client;
 
 /**
- *
+ * Chat Window. Contains one tab for each chat user.
+ * 
  * @author Eddie Berrisford-Lynch
  */
 public class Chat extends javax.swing.JDialog {
 
     /**
      * Creates new form WSYD_Chat
+     * @param parent owner window
+     * @param modal true if modal
      */
     public Chat(java.awt.Frame parent, boolean modal) {
         super(parent, modal);
@@ -116,20 +119,18 @@ public class Chat extends javax.swing.JDialog {
                     break;
                 }
             }
-        } catch (ClassNotFoundException ex) {
-            java.util.logging.Logger.getLogger(Chat.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        } catch (InstantiationException ex) {
-            java.util.logging.Logger.getLogger(Chat.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        } catch (IllegalAccessException ex) {
-            java.util.logging.Logger.getLogger(Chat.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
+        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
             java.util.logging.Logger.getLogger(Chat.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
         }
         //</editor-fold>
         //</editor-fold>
+        
+        //</editor-fold>
+        //</editor-fold>
 
         /* Create and display the dialog */
         java.awt.EventQueue.invokeLater(new Runnable() {
+            @Override
             public void run() {
                 Chat dialog = new Chat(new javax.swing.JFrame(), true);
                 dialog.addWindowListener(new java.awt.event.WindowAdapter() {