/* * SubmitTest.java * * Created on December 2, 2007, 2:00 PM */ /** * * @author bcolvin */ public class SubmitTest extends javax.swing.JFrame { /** Creates new form SubmitTest */ public SubmitTest() { 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() { jLabel1 = new javax.swing.JLabel(); Handin = new javax.swing.JButton(); scancel = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("Dialog", 1, 16)); jLabel1.setText("Are you sure you are ready to handin?"); Handin.setText("Hand In"); Handin.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { HandinActionPerformed(evt); } }); scancel.setText("Cancel"); scancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { scancelActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(32, 32, 32) .addComponent(Handin) .addGap(64, 64, 64) .addComponent(scancel)) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 316, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(21, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(25, 25, 25) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Handin) .addComponent(scancel)) .addContainerGap(32, Short.MAX_VALUE)) ); pack(); }// //GEN-END:initComponents private void scancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_scancelActionPerformed this.setVisible(false); }//GEN-LAST:event_scancelActionPerformed private void HandinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_HandinActionPerformed System.out.printf("Submitted"); this.setVisible(false); StudentTestToolUI.Fallmid.setVisible(false); }//GEN-LAST:event_HandinActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new SubmitTest().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton Handin; private javax.swing.JLabel jLabel1; private javax.swing.JButton scancel; // End of variables declaration//GEN-END:variables }