/* * MainView.java * * Created on November 18, 2007, 1:43 PM */ /** * * @author admin */ public class MainView extends javax.swing.JFrame { /** Creates new form MainView */ private Object table[][] = new Object [][]{ {null, "CPE 101", null, null, null}, { new javax.swing.JCheckBox(), "101-1","Nico","MWF 10AM-11AM","10-224" }, { new javax.swing.JCheckBox(), "101-2","Nico","MWF 11AM-12PM","14-124" }, { new javax.swing.JCheckBox(), "101-3","Smith","MWF 11AM-12PM","13-116" }, { new javax.swing.JCheckBox(), "101-4","Smith","MWF 12PM-1PM","14-124" }, { new javax.swing.JCheckBox(), "101-5","Lewis","MWF 1PM-2PM","10-224" }, { new javax.swing.JCheckBox(), "101-6","Lewis","MWF 2PM-3PM","14-124" }, { new javax.swing.JCheckBox(), "101-7","Robinson","TR 9AM-10:30AM","10-224" }, { new javax.swing.JCheckBox(), "101-8","Robinson","TR 10:30AM-12PM","14-124" }, { new javax.swing.JCheckBox(), "101-9","Jones","TR 1PM-2:30PM","3-024" }, { new javax.swing.JCheckBox(), "101-10","Jones","TR 2:30PM-4PM","14-124" } }; public MainView() { 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. */ // //GEN-BEGIN:initComponents private void initComponents() { jButton1 = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jButton1.setText("View Schedule Overview"); jButton1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { Overview_pressed(evt); } }); jScrollPane1.setForeground(new java.awt.Color(255, 255, 255)); jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "Lock", "Class/Section", "Professor", "Title 4", "Room" } )); jTable1.setModel(new javax.swing.table.DefaultTableModel( table, new String [] { "Lock", "Class/Section", "Professor", "Title 4", "Room" } )); jScrollPane1.setViewportView(jTable1); 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() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jButton1) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(jButton1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 286, Short.MAX_VALUE) .addContainerGap()) ); pack(); }// //GEN-END:initComponents private void Overview_pressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Overview_pressed so = new SOverview(); so.setVisible(true); this.setVisible(false); }//GEN-LAST:event_Overview_pressed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable jTable1; public SOverview so; // End of variables declaration//GEN-END:variables }