@SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jScrollPane1 = new javax.swing.JScrollPane();
    forumTable = new javax.swing.JTable();
    jLabel1 = new javax.swing.JLabel();
    CancelButton = new javax.swing.JButton();
    replyButton = new javax.swing.JButton();
    ViewThreadButton = new javax.swing.JButton();
    deletePostButton = new javax.swing.JButton();
    editPostButton = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    forumTable.setModel(new AbstractTableModel()
      {
        @Override
        public int getRowCount()
        {
          return data.length;
        }

        @Override
        public int getColumnCount()
        {
          return 3;
        }

        @Override
        public String getValueAt(int i, int j)
        {
          String temp = null;
          switch (j)
          {
            case 0:
            temp = data[i].author;
            break;
            case 1:
            temp = data[i].title;
            break;
            case 2:
            temp = data[i].body;
            break;
          }
          return temp;
        }

        public void setValueAt(String val, int i, int j)
        {
          switch (j)
          {
            case 1:
            data[i].author = val;
            break;
            case 2:
            data[i].title = val;
            break;
            case 3:
            data[i].body = val;
            break;
          }
        }
      });
      jScrollPane1.setViewportView(forumTable);

      jLabel1.setFont(new java.awt.Font("Lucida Grande", 0, 18)); // NOI18N
      jLabel1.setText("Forum");

      CancelButton.setText("Cancel");
      CancelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          CancelButtonActionPerformed(evt);
        }
      });

      replyButton.setText("Reply");
      replyButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          replyButtonActionPerformed(evt);
        }
      });

      ViewThreadButton.setText("View");
      ViewThreadButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          ViewThreadButtonActionPerformed(evt);
        }
      });

      deletePostButton.setText("Delete");
      deletePostButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          deletePostButtonActionPerformed(evt);
        }
      });

      editPostButton.setText("Edit");
      editPostButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          editPostButtonActionPerformed(evt);
        }
      });

      org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
      getContentPane().setLayout(layout);
      layout.setHorizontalGroup(
        layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
        .add(layout.createSequentialGroup()
          .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
              .add(394, 394, 394)
              .add(jLabel1)
              .add(0, 419, Short.MAX_VALUE))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
              .addContainerGap()
              .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                .add(layout.createSequentialGroup()
                  .add(0, 0, Short.MAX_VALUE)
                  .add(ViewThreadButton)
                  .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                  .add(editPostButton)
                  .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                  .add(deletePostButton)
                  .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                  .add(replyButton)
                  .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                  .add(CancelButton))
                .add(jScrollPane1))))
          .addContainerGap())
      );
      layout.setVerticalGroup(
        layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
        .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
          .addContainerGap(68, Short.MAX_VALUE)
          .add(jLabel1)
          .add(18, 18, 18)
          .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 368, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
          .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
          .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
            .add(CancelButton)
            .add(replyButton)
            .add(ViewThreadButton)
            .add(deletePostButton)
            .add(editPostButton))
          .addContainerGap())
      );

      pack();
    }// </editor-fold>//GEN-END:initComponents