/* * Qcomment.java * * Created on December 2, 2007, 1:27 PM */ /** * * @author bcolvin */ public class Qcomment extends javax.swing.JFrame { /** Creates new form Qcomment */ public Qcomment() { 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() { qcommentarea = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); Qsubmit = new javax.swing.JButton(); qCancel = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Question Comment"); setAlwaysOnTop(true); jTextArea1.setColumns(20); jTextArea1.setRows(5); qcommentarea.setViewportView(jTextArea1); Qsubmit.setText("Submit"); Qsubmit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { QsubmitActionPerformed(evt); } }); qCancel.setText("Cancel"); qCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { qCancelActionPerformed(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() .addComponent(qcommentarea, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(38, 38, 38) .addComponent(Qsubmit) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 109, Short.MAX_VALUE) .addComponent(qCancel) .addGap(74, 74, 74)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(qcommentarea, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(qCancel) .addComponent(Qsubmit)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// //GEN-END:initComponents private void qCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_qCancelActionPerformed this.setVisible(false); }//GEN-LAST:event_qCancelActionPerformed private void QsubmitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_QsubmitActionPerformed System.out.printf("Commented"); this.setVisible(false); }//GEN-LAST:event_QsubmitActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Qcomment().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton Qsubmit; private javax.swing.JTextArea jTextArea1; private javax.swing.JButton qCancel; private javax.swing.JScrollPane qcommentarea; // End of variables declaration//GEN-END:variables }