/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Kyle */ public class GraderGUI extends javax.swing.JPanel { /** * Creates new form GraderGUI */ public GraderGUI() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { jButton1 = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jButton2 = new javax.swing.JButton(); jButton1.setText("Add Assignment +"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {"HW1", "Homework", new Integer(10), "1/1/2012", "decay", new Boolean(true), null}, {"HW2", "Homework", new Integer(10), "2/2/2012", "decay", new Boolean(true), null}, {"HW3", "Homework", new Integer(10), "3/3/2012", "decay", new Boolean(true), null}, {"Midterm", "Tests", new Integer(50), "4/4/2012", null, new Boolean(true), null}, {"Final", "Tests", new Integer(100), "5/5/2012", null, new Boolean(true), null}, {"Quiz 1", "Quizzes", new Integer(20), "6/6/2012", null, new Boolean(true), null}, {"Quiz 2", "Quizzes", new Integer(20), "7/7/2012", null, new Boolean(true), null}, {"Quiz 3", "Quizzes", new Integer(20), "8/8/2012", null, new Boolean(true), null} }, new String [] { "Name", "Category", "Points", "Due Date", "Late Policy", "Allow EC", "Electronic" } ) { Class[] types = new Class [] { java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.Boolean.class, java.lang.Boolean.class }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } }); jScrollPane1.setViewportView(jTable1); jButton2.setText("Add Assignment +"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jButton2) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2)) ); }// //GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jButton1ActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable jTable1; // End of variables declaration//GEN-END:variables }