Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * To change this template, choose Tools | Templates
   * and open the template in the editor.
   */
  
  /*
   * TatoolOnlineDialog.java
   *
   * Created on 28.01.2011, 20:25:16
  */
 
 package ch.tatool.core.module.creator;
 
 

Author(s):
jrox
 
 public class TatoolOnlineDialog extends javax.swing.JDialog {
 
 	private static final long serialVersionUID = 1L;
 	
 	private int studyID;
 	private int moduleNR;
 	private String code;
 	private Messages messages;

Creates new form TatoolOnlineDialog
 
 	public TatoolOnlineDialog(java.awt.Frame parentboolean modalMessages messages) {
 		super(parentmodal);
 		this. = messages;
 	}
 
 	public void setCreator(DataServerModuleCreator dataServerModuleCreator) {
 		 = dataServerModuleCreator;
 	}
 
 	private void validateInput() {
 		
 		 = 0;
 		 = 0;
 		 = "";
 		
 		try {
 		} catch (NumberFormatException nFE) {
 			JOptionPane.showMessageDialog(this,
 					.getString("TatoolOnlineDialog.errorMessage.numeric"), .getString("General.errorMessage.windowTitle.error"),
 			return;
 		}
 		
 		if ( == 0 ||  == 0) {
 			JOptionPane.showMessageDialog(this,
 					.getString("TatoolOnlineDialog.errorMessage.numeric"), .getString("General.errorMessage.windowTitle.error"),
 			return;
 		}
 		
 		if (.getText().equals("")) {
 			JOptionPane.showMessageDialog(this,
 					.getString("TatoolOnlineDialog.errorMessage.missingCode"), .getString("General.errorMessage.windowTitle.error"),
 		} else {
 			String[] data = {String.valueOf(), String.valueOf(), };
 		}
 	}

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.
 
 	// <editor-fold defaultstate="collapsed"
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private void initComponents() {
         java.awt.GridBagConstraints gridBagConstraints;
 
          = new javax.swing.JPanel();
          = new javax.swing.JPanel();
          = new javax.swing.JLabel();
          = new javax.swing.JPanel();
          = new javax.swing.JLabel();
          = new javax.swing.JLabel();
          = new javax.swing.JLabel();
          = new javax.swing.JTextField();
          = new javax.swing.JTextField();
          = new javax.swing.JTextField();
         = new javax.swing.JPanel();
         = new javax.swing.JButton();
         = new javax.swing.JButton();
        setTitle(.getString("TatoolOnlineDialog.title"));
        getContentPane().setLayout(new java.awt.GridBagLayout());
        .setLayout(new java.awt.GridBagLayout());
        .setLayout(new java.awt.GridBagLayout());
        .setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        .setText(.getString("TatoolOnlineDialog.label.enterCode"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = ...;
        .add(gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = ...;
        gridBagConstraints.insets = new java.awt.Insets(15, 15, 15, 15);
        .add(gridBagConstraints);
        .setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        .setLayout(new java.awt.GridBagLayout());
        .setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        .setText(.getString("TatoolOnlineDialog.label.studyId"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = ...;
        gridBagConstraints.ipady = 15;
        gridBagConstraints.weightx = 1.0;
        .add(gridBagConstraints);
        .setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        .setText(.getString("TatoolOnlineDialog.label.moduleNr"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = ...;
        gridBagConstraints.ipady = 15;
        gridBagConstraints.weightx = 1.0;
        .add(gridBagConstraints);
        .setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        .setText(.getString("TatoolOnlineDialog.label.code"));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = ...;
        gridBagConstraints.ipady = 15;
        gridBagConstraints.weightx = 1.0;
        .add(gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = ...;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.weightx = 1.0;
        .add(gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = ...;
        gridBagConstraints.weightx = 1.0;
        .add(gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = ...;
        gridBagConstraints.weightx = 1.0;
        .add(gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = ...;
        gridBagConstraints.insets = new java.awt.Insets(0, 15, 5, 15);
        .add(gridBagConstraints);
        .setText(.getString("General.okLabel"));
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                okButtonActionPerformed(evt);
            }
        });
        .add();
        .setText(.getString("General.cancelLabel"));
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelButtonActionPerformed(evt);
            }
        });
        .add();
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = ...;
        gridBagConstraints.insets = new java.awt.Insets(0, 15, 10, 15);
        .add(gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = ...;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        getContentPane().add(gridBagConstraints);
        pack();
    }// </editor-fold>//GEN-END:initComponents
        private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
        	dispose();
        }//GEN-LAST:event_cancelButtonActionPerformed
        private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
        	validateInput();
        }//GEN-LAST:event_okButtonActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel buttonPanel;
    private javax.swing.JButton cancelButton;
    private javax.swing.JLabel codeLabel;
    private javax.swing.JPanel inputPanel;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel moduleLabel;
    private javax.swing.JButton okButton;
    private javax.swing.JLabel studyLabel;
    private javax.swing.JPanel textPanel;
    // End of variables declaration//GEN-END:variables
New to GrepCode? Check out our FAQ X