List of usage examples for javax.swing GroupLayout linkSize
public void linkSize(int axis, Component... components)
From source file:com.mirth.connect.client.ui.editors.RuleBuilderPanel.java
/** * 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./*w ww . j a v a2s .co m*/ */ // <editor-fold defaultstate="collapsed" desc=" Generated Code // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jLabel1 = new javax.swing.JLabel(); valuesScrollPane = new javax.swing.JScrollPane(); valuesTable = new com.mirth.connect.client.ui.components.MirthTable(); newButton = new javax.swing.JButton(); deleteButton = new javax.swing.JButton(); valuesLabel = new javax.swing.JLabel(); fieldTextField = new javax.swing.JTextField(); equals = new javax.swing.JRadioButton(); doesNotEqual = new javax.swing.JRadioButton(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); exists = new javax.swing.JRadioButton(); doesNotExist = new javax.swing.JRadioButton(); acceptLabel = new javax.swing.JLabel(); contains = new javax.swing.JRadioButton(); doesNotContain = new javax.swing.JRadioButton(); setBackground(new java.awt.Color(255, 255, 255)); jLabel1.setText("Field:"); valuesTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Value" })); valuesScrollPane.setViewportView(valuesTable); newButton.setText("New"); newButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newButtonActionPerformed(evt); } }); deleteButton.setText("Delete"); deleteButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteButtonActionPerformed(evt); } }); valuesLabel.setText("Values:"); equals.setBackground(new java.awt.Color(255, 255, 255)); buttonGroup1.add(equals); equals.setText("Equals"); equals.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); equals.setMargin(new java.awt.Insets(0, 0, 0, 0)); equals.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { equalsActionPerformed(evt); } }); doesNotEqual.setBackground(new java.awt.Color(255, 255, 255)); buttonGroup1.add(doesNotEqual); doesNotEqual.setText("Not Equal"); doesNotEqual.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); doesNotEqual.setMargin(new java.awt.Insets(0, 0, 0, 0)); doesNotEqual.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { doesNotEqualActionPerformed(evt); } }); jLabel2.setText("Condition:"); jLabel3.setText("Behavior:"); exists.setBackground(new java.awt.Color(255, 255, 255)); buttonGroup1.add(exists); exists.setText("Exists"); exists.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); exists.setMargin(new java.awt.Insets(0, 0, 0, 0)); exists.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { existsActionPerformed(evt); } }); doesNotExist.setBackground(new java.awt.Color(255, 255, 255)); buttonGroup1.add(doesNotExist); doesNotExist.setText("Not Exist"); doesNotExist.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); doesNotExist.setMargin(new java.awt.Insets(0, 0, 0, 0)); doesNotExist.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { doesNotExistActionPerformed(evt); } }); acceptLabel.setText("Accept"); contains.setBackground(new java.awt.Color(255, 255, 255)); buttonGroup1.add(contains); contains.setText("Contains"); contains.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); contains.setMargin(new java.awt.Insets(0, 0, 0, 0)); contains.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { containsActionPerformed(evt); } }); doesNotContain.setBackground(new java.awt.Color(255, 255, 255)); buttonGroup1.add(doesNotContain); doesNotContain.setText("Not Contain"); doesNotContain.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); doesNotContain.setMargin(new java.awt.Insets(0, 0, 0, 0)); doesNotContain.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { doesNotContainActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel1).addComponent(jLabel2).addComponent(valuesLabel) .addComponent(jLabel3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(exists) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(doesNotExist) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(equals) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(doesNotEqual) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(contains) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(doesNotContain)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(valuesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 325, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(newButton).addComponent(deleteButton))) .addComponent(fieldTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE) .addComponent(acceptLabel)) .addContainerGap())); layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { deleteButton, newButton }); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3).addComponent(acceptLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1).addComponent(fieldTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(equals).addComponent(doesNotEqual).addComponent(jLabel2) .addComponent(exists).addComponent(doesNotExist).addComponent(contains) .addComponent(doesNotContain)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(newButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(deleteButton)) .addComponent(valuesLabel).addComponent(valuesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)) .addContainerGap())); }
From source file:com.nwn.NwnUpdaterHomeView.java
/** * 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. *///from w ww. jav a 2s.c o m @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { btnStartUpdate = new javax.swing.JButton(); btnClose = new javax.swing.JButton(); cmbServerList = new javax.swing.JComboBox(); progressBarOverall = new javax.swing.JProgressBar(); jScrollPane2 = new javax.swing.JScrollPane(); txtOutput = new javax.swing.JTextArea(); DefaultCaret caret = (DefaultCaret) txtOutput.getCaret(); caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE); jLabel1 = new javax.swing.JLabel(); btnRemoveServer = new javax.swing.JButton(); btnAddServer = new javax.swing.JButton(); txtNwnDir = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); btnSelectNwnDir = new javax.swing.JButton(); progressBarTask = new javax.swing.JProgressBar(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("NWN Server Updater"); btnStartUpdate.setText("Update"); btnStartUpdate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnStartUpdateActionPerformed(evt); } }); btnClose.setText("Close"); btnClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCloseActionPerformed(evt); } }); txtOutput.setEditable(false); txtOutput.setBackground(new java.awt.Color(0, 0, 0)); txtOutput.setColumns(20); txtOutput.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N txtOutput.setForeground(new java.awt.Color(0, 255, 0)); txtOutput.setLineWrap(true); txtOutput.setRows(5); txtOutput.setText( "NWN Server Updater \nversion: 4.00\nBy: Skipper Warlock\nMay the work of DM Ronin stay undead forever."); txtOutput.setWrapStyleWord(true); txtOutput.setCaretColor(new java.awt.Color(0, 255, 0)); txtOutput.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); jScrollPane2.setViewportView(txtOutput); jLabel1.setText("Server:"); btnRemoveServer.setText("Remove"); btnRemoveServer.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRemoveServerActionPerformed(evt); } }); btnAddServer.setText("Add"); btnAddServer.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAddServerActionPerformed(evt); } }); txtNwnDir.setText("C:\\NeverwinterNights\\NWN"); jLabel2.setText("NWN Dir:"); btnSelectNwnDir.setText("Browse"); btnSelectNwnDir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSelectNwnDirActionPerformed(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).addComponent(jScrollPane2) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1).addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(txtNwnDir) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnSelectNwnDir)) .addComponent(cmbServerList, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addComponent(btnAddServer) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnRemoveServer)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(progressBarTask, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 401, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(progressBarOverall, javax.swing.GroupLayout.PREFERRED_SIZE, 401, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnStartUpdate) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnClose))) .addContainerGap())); layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { btnClose, btnStartUpdate }); layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { btnAddServer, btnRemoveServer }); layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { progressBarOverall, progressBarTask }); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cmbServerList, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnRemoveServer).addComponent(btnAddServer)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtNwnDir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2).addComponent(btnSelectNwnDir)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 374, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addComponent(progressBarTask, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(progressBarOverall, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(btnStartUpdate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnClose, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { progressBarOverall, progressBarTask }); pack(); }
From source file:com.cmsoftware.keyron.vista.admin.ActivarEmpleado.java
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { panelFondo = new javax.swing.JPanel(); labelError = new javax.swing.JLabel(); panelDatos = new javax.swing.JPanel(); aceptar = new javax.swing.JButton(); label_correo = new javax.swing.JLabel(); label_clave = new javax.swing.JLabel(); correo = new javax.swing.JTextField(); clave = new javax.swing.JPasswordField(); cancelar = new javax.swing.JButton(); separador = new javax.swing.JLabel(); mensajeAcceso = new javax.swing.JLabel(); label_titulo = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Cambiar Clave"); setResizable(false);/*from w ww. j a v a 2 s . co m*/ addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); panelFondo.setBackground(new java.awt.Color(119, 41, 83)); labelError.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N labelError.setForeground(new java.awt.Color(255, 255, 255)); labelError.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); aceptar.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N aceptar.setForeground(new java.awt.Color(89, 89, 89)); aceptar.setText("Aceptar"); aceptar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); aceptar.setMargin(new java.awt.Insets(6, 14, 6, 14)); aceptar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { aceptarActionPerformed(evt); } }); label_correo.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N label_correo.setForeground(new java.awt.Color(89, 89, 89)); label_correo.setText("Correo:"); label_clave.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N label_clave.setForeground(new java.awt.Color(89, 89, 89)); label_clave.setText("Clave:"); correo.setFont(com.cmsoftware.keyron.controlador.Optimizacion.getInstancia().getFuente().MyFont(0, 14f)); correo.setForeground(new java.awt.Color(89, 89, 89)); correo.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { correoKeyTyped(evt); } }); clave.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N clave.setForeground(new java.awt.Color(89, 89, 89)); clave.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { claveKeyTyped(evt); } }); cancelar.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N cancelar.setForeground(new java.awt.Color(89, 89, 89)); cancelar.setText("Cancelar"); cancelar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); cancelar.setMargin(new java.awt.Insets(6, 14, 6, 14)); cancelar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelarActionPerformed(evt); } }); separador.setForeground(new java.awt.Color(119, 41, 83)); separador.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); separador.setText("__________________________________________________________________"); mensajeAcceso.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N mensajeAcceso.setForeground(new java.awt.Color(89, 89, 89)); mensajeAcceso.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); mensajeAcceso.setText("Para confirmar la activacin, por favor confirme su sesin"); javax.swing.GroupLayout panelDatosLayout = new javax.swing.GroupLayout(panelDatos); panelDatos.setLayout(panelDatosLayout); panelDatosLayout.setHorizontalGroup(panelDatosLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelDatosLayout.createSequentialGroup().addContainerGap().addGroup(panelDatosLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(mensajeAcceso, javax.swing.GroupLayout.DEFAULT_SIZE, 459, Short.MAX_VALUE) .addGroup(panelDatosLayout.createSequentialGroup().addGroup(panelDatosLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelDatosLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(panelDatosLayout.createSequentialGroup().addComponent(aceptar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cancelar)) .addGroup(panelDatosLayout.createSequentialGroup().addGroup(panelDatosLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(label_clave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(label_correo, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(panelDatosLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(correo, javax.swing.GroupLayout.DEFAULT_SIZE, 327, Short.MAX_VALUE) .addComponent(clave)))) .addComponent(separador, javax.swing.GroupLayout.PREFERRED_SIZE, 447, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); panelDatosLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { aceptar, cancelar }); panelDatosLayout.setVerticalGroup(panelDatosLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelDatosLayout.createSequentialGroup().addGap(20, 20, 20).addComponent(mensajeAcceso) .addGap(11, 11, 11).addComponent(separador).addGap(18, 18, 18) .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(label_correo, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(correo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(label_clave, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(clave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(aceptar).addComponent(cancelar)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); panelDatosLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { clave, correo }); label_titulo .setFont(com.cmsoftware.keyron.controlador.Optimizacion.getInstancia().getFuente().MyFont(1, 16f)); label_titulo.setForeground(new java.awt.Color(255, 255, 255)); label_titulo.setIcon(new javax.swing.ImageIcon( getClass().getResource("/com/cmsoftware/keyron/recursos/cambiar_clave.png"))); // NOI18N label_titulo.setText("Activar Empleado"); javax.swing.GroupLayout panelFondoLayout = new javax.swing.GroupLayout(panelFondo); panelFondo.setLayout(panelFondoLayout); panelFondoLayout.setHorizontalGroup(panelFondoLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(labelError, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(label_titulo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 479, Short.MAX_VALUE) .addComponent(panelDatos, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); panelFondoLayout.setVerticalGroup(panelFondoLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelFondoLayout.createSequentialGroup() .addComponent(label_titulo, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE) .addComponent(panelDatos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0).addComponent(labelError, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(panelFondo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( panelFondo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); }
From source file:com.mirth.connect.client.ui.editors.MessageBuilder.java
/** * 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.//from ww w . j a v a2 s. c o m */ // <editor-fold defaultstate="collapsed" desc=" Generated Code // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); regularExpressionsScrollPane = new javax.swing.JScrollPane(); regularExpressionsTable = new com.mirth.connect.client.ui.components.MirthTable(); newButton = new javax.swing.JButton(); deleteButton = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); variableTextField = new javax.swing.JTextField(); mappingTextField = new javax.swing.JTextField(); defaultValueTextField = new javax.swing.JTextField(); setBackground(new java.awt.Color(255, 255, 255)); jLabel1.setText("Message Segment:"); jLabel2.setText("Mapping:"); jLabel3.setText("Default Value:"); regularExpressionsTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Property", "Value" })); regularExpressionsScrollPane.setViewportView(regularExpressionsTable); newButton.setText("New"); newButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newButtonActionPerformed(evt); } }); deleteButton.setText("Delete"); deleteButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteButtonActionPerformed(evt); } }); jLabel4.setText("String Replacement:"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout .createSequentialGroup().addGap(16, 16, 16) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel3).addComponent(jLabel2).addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addComponent(regularExpressionsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 347, Short.MAX_VALUE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(deleteButton) .addComponent(newButton))) .addComponent(variableTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 416, Short.MAX_VALUE) .addComponent(mappingTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 416, Short.MAX_VALUE) .addComponent(defaultValueTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 416, Short.MAX_VALUE))) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel4))) .addContainerGap())); layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { deleteButton, newButton }); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1).addComponent(variableTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(mappingTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3).addComponent(defaultValueTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4).addComponent(newButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(deleteButton)) .addComponent(regularExpressionsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)) .addContainerGap())); }
From source file:imageprocessingproject.MainFrame.java
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jFileChooser1 = new javax.swing.JFileChooser(); buttonGroup1 = new javax.swing.ButtonGroup(); buttonGroup2 = new javax.swing.ButtonGroup(); buttonGroup3 = new javax.swing.ButtonGroup(); jPanel5 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); lbl_img = new javax.swing.JLabel(); btnOpenFile = new javax.swing.JButton(); btnUndo = new javax.swing.JButton(); jPanel6 = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); radioBtnMean = new javax.swing.JRadioButton(); radioBtnMedian = new javax.swing.JRadioButton(); radioBtnAlpha = new javax.swing.JRadioButton(); btnApplyFilter = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jButton2 = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); btnFlip = new javax.swing.JButton(); jPanel3 = new javax.swing.JPanel(); btnScale = new javax.swing.JButton(); spinnerScale = new javax.swing.JSpinner(); jLabel2 = new javax.swing.JLabel(); jPanel4 = new javax.swing.JPanel(); jButton3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jButton5 = new javax.swing.JButton(); jButton6 = new javax.swing.JButton(); btnAutoContrast = new javax.swing.JButton(); jPanel7 = new javax.swing.JPanel(); btnEdgeFiltet = new javax.swing.JButton(); radioBtnSobelH = new javax.swing.JRadioButton(); radioBtnPrewittV = new javax.swing.JRadioButton(); radioBtnLaplacian = new javax.swing.JRadioButton(); radioBtnPrewittH = new javax.swing.JRadioButton(); sliderThreshold = new javax.swing.JSlider(); jLabel1 = new javax.swing.JLabel(); radioBtnSobelV = new javax.swing.JRadioButton(); jPanel8 = new javax.swing.JPanel(); radioBtnNegative = new javax.swing.JRadioButton(); radioBtnGrsyscale = new javax.swing.JRadioButton(); radioBtnDither = new javax.swing.JRadioButton(); btnApplyConversion = new javax.swing.JButton(); histoPanel = new javax.swing.JPanel(); btnSave = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Image Editer"); setResizable(false);/*from www . jav a2 s .c om*/ lbl_img.setVerticalAlignment(javax.swing.SwingConstants.TOP); jScrollPane1.setViewportView(lbl_img); btnOpenFile.setIcon(new javax.swing.ImageIcon( getClass().getResource("/imageprocessingproject/rsz_folder-35945_640.png"))); // NOI18N btnOpenFile.setToolTipText("Open Image"); btnOpenFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnOpenFileActionPerformed(evt); } }); btnUndo.setIcon(new javax.swing.ImageIcon( getClass().getResource("/imageprocessingproject/rsz_icon-ios7-undo-512.png"))); // NOI18N btnUndo.setToolTipText("Undo"); btnUndo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnUndoActionPerformed(evt); } }); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Filter", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 14))); // NOI18N buttonGroup1.add(radioBtnMean); radioBtnMean.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N radioBtnMean.setSelected(true); radioBtnMean.setText("Mean Filter"); radioBtnMean.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { radioBtnMeanActionPerformed(evt); } }); buttonGroup1.add(radioBtnMedian); radioBtnMedian.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N radioBtnMedian.setText("Median Filter"); buttonGroup1.add(radioBtnAlpha); radioBtnAlpha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N radioBtnAlpha.setText("Alpha Trimmed Filter"); btnApplyFilter.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N btnApplyFilter.setText("Apply"); btnApplyFilter.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnApplyFilterActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(36, 36, 36) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(radioBtnAlpha, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(radioBtnMedian).addComponent(radioBtnMean) .addComponent(btnApplyFilter, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(radioBtnMean) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(radioBtnMedian) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(radioBtnAlpha) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnApplyFilter))); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Transformation", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 14))); // NOI18N jButton2.setIcon(new javax.swing.ImageIcon( getClass().getResource("/imageprocessingproject/rsz_1rsz_rotate_right_arrow.png"))); // NOI18N jButton2.setToolTipText("Rotate Clockwise 90 degrees"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jButton1.setIcon(new javax.swing.ImageIcon( getClass().getResource("/imageprocessingproject/rsz_rotate_left_arrow.png"))); // NOI18N jButton1.setToolTipText("Rotate Anti-Clockwise 90 degrees"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); btnFlip.setIcon(new javax.swing.ImageIcon( getClass().getResource("/imageprocessingproject/rsz_vertical_align_mirror-512.png"))); // NOI18N btnFlip.setToolTipText("Flip Horizontal"); btnFlip.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnFlipActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout .setHorizontalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnFlip, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnFlip, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(13, Short.MAX_VALUE))); jPanel2Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { btnFlip, jButton1, jButton2 }); jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Scaling", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 14))); // NOI18N btnScale.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N btnScale.setText("Scale"); btnScale.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnScaleActionPerformed(evt); } }); spinnerScale.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N spinnerScale.setValue(200); jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel2.setText("%"); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap(33, Short.MAX_VALUE) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(btnScale, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() .addComponent(spinnerScale, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap())); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(spinnerScale, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnScale).addGap(19, 19, 19))); jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Lighting", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 14))); // NOI18N jButton3.setIcon(new javax.swing.ImageIcon( getClass().getResource("/imageprocessingproject/rsz_1enlighten_sun_light_brightness-512.png"))); // NOI18N jButton3.setToolTipText("Increase Brightness"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jButton4.setIcon(new javax.swing.ImageIcon( getClass().getResource("/imageprocessingproject/rsz_enlighten_sun_light_brightness-512.png"))); // NOI18N jButton4.setToolTipText("Decrease Brightness"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); jButton5.setIcon(new javax.swing.ImageIcon( getClass().getResource("/imageprocessingproject/rsz_moon_last_quarter-512.png"))); // NOI18N jButton5.setToolTipText("Increase Contrast"); jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton5ActionPerformed(evt); } }); jButton6.setIcon(new javax.swing.ImageIcon(getClass() .getResource("/imageprocessingproject/rsz_basic3-102_visibility_contrast_brightness-512.png"))); // NOI18N jButton6.setToolTipText("Decrease Contrast"); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); btnAutoContrast.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N btnAutoContrast.setText("Auto Contrast"); btnAutoContrast.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAutoContrastActionPerformed(evt); } }); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout .setHorizontalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnAutoContrast, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(3, 3, 3))); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE) .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE) .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE) .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE) .addComponent(btnAutoContrast, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(38, 38, 38))); jPanel4Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { jButton3, jButton4, jButton5, jButton6 }); jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Edge Detection", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 14))); // NOI18N btnEdgeFiltet.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N btnEdgeFiltet.setText("Filter"); btnEdgeFiltet.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEdgeFiltetActionPerformed(evt); } }); buttonGroup2.add(radioBtnSobelH); radioBtnSobelH.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N radioBtnSobelH.setText("Sobel Horizontal"); buttonGroup2.add(radioBtnPrewittV); radioBtnPrewittV.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N radioBtnPrewittV.setText("Prewitt Vertical"); buttonGroup2.add(radioBtnLaplacian); radioBtnLaplacian.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N radioBtnLaplacian.setSelected(true); radioBtnLaplacian.setText("Laplacian"); buttonGroup2.add(radioBtnPrewittH); radioBtnPrewittH.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N radioBtnPrewittH.setText("Prewitt Horizontal"); jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); jLabel1.setText("Threshold"); buttonGroup2.add(radioBtnSobelV); radioBtnSobelV.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N radioBtnSobelV.setText("Sobel Vertical"); javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup(jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup().addGap(29, 29, 29) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(radioBtnSobelV).addComponent(radioBtnLaplacian) .addComponent(radioBtnPrewittV).addComponent(radioBtnSobelH) .addComponent(sliderThreshold, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(btnEdgeFiltet, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(radioBtnPrewittH, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup().addGroup(jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel7Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(54, 54, 54)) .addGroup(jPanel7Layout.createSequentialGroup() .addComponent(sliderThreshold, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 4, Short.MAX_VALUE) .addComponent(radioBtnSobelH) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(radioBtnSobelV) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))) .addComponent(radioBtnPrewittV) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(radioBtnPrewittH) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(radioBtnLaplacian) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnEdgeFiltet).addContainerGap(14, Short.MAX_VALUE))); jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Convert", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 14))); // NOI18N buttonGroup3.add(radioBtnNegative); radioBtnNegative.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N radioBtnNegative.setSelected(true); radioBtnNegative.setText("Negative"); radioBtnNegative.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { radioBtnNegativeActionPerformed(evt); } }); buttonGroup3.add(radioBtnGrsyscale); radioBtnGrsyscale.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N radioBtnGrsyscale.setText("Grayscale"); buttonGroup3.add(radioBtnDither); radioBtnDither.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N radioBtnDither.setText("Dither"); btnApplyConversion.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N btnApplyConversion.setText("Apply"); btnApplyConversion.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnApplyConversionActionPerformed(evt); } }); javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout.setHorizontalGroup(jPanel8Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup().addGap(36, 36, 36).addGroup(jPanel8Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btnApplyConversion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel8Layout.createSequentialGroup() .addGroup(jPanel8Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(radioBtnDither, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(radioBtnGrsyscale).addComponent(radioBtnNegative)) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(radioBtnNegative) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(radioBtnGrsyscale) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(radioBtnDither) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnApplyConversion))); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap().addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel6Layout.createSequentialGroup() .addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); jPanel6Layout .setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(46, 46, 46))); histoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Image Histogram", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14))); // NOI18N javax.swing.GroupLayout histoPanelLayout = new javax.swing.GroupLayout(histoPanel); histoPanel.setLayout(histoPanelLayout); histoPanelLayout.setHorizontalGroup(histoPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); histoPanelLayout.setVerticalGroup(histoPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); btnSave.setIcon( new javax.swing.ImageIcon(getClass().getResource("/imageprocessingproject/rsz_save-xxl.png"))); // NOI18N btnSave.setToolTipText("Save Image"); btnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel3.setText("Image Editer"); jLabel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup(jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap().addGroup(jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(btnOpenFile, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnUndo, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 942, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel5Layout.createSequentialGroup() .addGroup(jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(histoPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap())); jPanel5Layout .setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false) .addComponent(btnOpenFile, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnUndo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnSave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 632, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 414, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(histoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())))); jPanel5Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { btnOpenFile, btnSave, btnUndo }); 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(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0))); pack(); }
From source file:me.mayo.telnetkek.MainPanel.java
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { splitPane = new javax.swing.JSplitPane(); jPanel3 = new javax.swing.JPanel(); mainOutputScoll = new javax.swing.JScrollPane(); mainOutput = new javax.swing.JTextPane(); btnDisconnect = new javax.swing.JButton(); btnSend = new javax.swing.JButton(); txtServer = new javax.swing.JComboBox<>(); chkAutoScroll = new javax.swing.JCheckBox(); txtCommand = new javax.swing.JTextField(); btnConnect = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel2 = new javax.swing.JPanel(); tblPlayersScroll = new javax.swing.JScrollPane(); tblPlayers = new javax.swing.JTable(); jLabel3 = new javax.swing.JLabel(); txtNumPlayers = new javax.swing.JTextField(); jPanel1 = new javax.swing.JPanel(); chkIgnorePlayerCommands = new javax.swing.JCheckBox(); chkIgnoreServerCommands = new javax.swing.JCheckBox(); chkShowChatOnly = new javax.swing.JCheckBox(); chkIgnoreErrors = new javax.swing.JCheckBox(); jPanel4 = new javax.swing.JPanel(); favoriteButtonsPanelHolder = new javax.swing.JPanel(); favoriteButtonsPanelScroll = new javax.swing.JScrollPane(); favoriteButtonsPanel = new me.mayo.telnetkek.button.FavoriteButtonsPanel(favButtonList); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("BukkitTelnetClient"); splitPane.setBackground(new java.awt.Color(68, 68, 68)); splitPane.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(68, 68, 68), 5)); splitPane.setResizeWeight(1.0);/*from w w w .ja v a 2 s . c o m*/ jPanel3.setBackground(new java.awt.Color(68, 68, 68)); mainOutput.setEditable(false); mainOutput.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N mainOutput.setForeground(new java.awt.Color(255, 255, 255)); mainOutputScoll.setViewportView(mainOutput); btnDisconnect.setBackground(new java.awt.Color(68, 68, 68)); btnDisconnect.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N btnDisconnect.setText("Leave"); btnDisconnect.setEnabled(false); btnDisconnect.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDisconnectActionPerformed(evt); } }); btnSend.setBackground(new java.awt.Color(68, 68, 68)); btnSend.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N btnSend.setText("Send"); btnSend.setEnabled(false); btnSend.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSendActionPerformed(evt); } }); txtServer.setBackground(new java.awt.Color(91, 91, 91)); txtServer.setEditable(true); txtServer.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N txtServer.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtServerActionPerformed(evt); } }); chkAutoScroll.setBackground(new java.awt.Color(68, 68, 68)); chkAutoScroll.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N chkAutoScroll.setForeground(new java.awt.Color(255, 255, 255)); chkAutoScroll.setSelected(true); chkAutoScroll.setText("Auto Scroll"); txtCommand.setEnabled(false); txtCommand.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { txtCommandKeyPressed(evt); } }); btnConnect.setBackground(new java.awt.Color(68, 68, 68)); btnConnect.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N btnConnect.setText("Join"); btnConnect.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnConnectActionPerformed(evt); } }); jLabel1.setBackground(new java.awt.Color(68, 68, 68)); jLabel1.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("Command:"); jLabel2.setBackground(new java.awt.Color(68, 68, 68)); jLabel2.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("Server:"); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(mainOutputScoll) .addGroup(jPanel3Layout.createSequentialGroup().addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1)).addGap(18, 18, 18) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtCommand) .addComponent(txtServer, 0, 411, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(btnConnect, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnSend, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btnDisconnect).addComponent(chkAutoScroll)))) .addContainerGap())); jPanel3Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { btnConnect, btnDisconnect, btnSend, chkAutoScroll }); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap() .addComponent(mainOutputScoll, javax.swing.GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtCommand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1).addComponent(btnSend).addComponent(chkAutoScroll)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(btnConnect).addComponent(btnDisconnect) .addComponent(txtServer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); splitPane.setLeftComponent(jPanel3); jTabbedPane1.setBackground(new java.awt.Color(68, 68, 68)); jTabbedPane1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); jTabbedPane1.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N jPanel2.setBackground(new java.awt.Color(68, 68, 68)); tblPlayers.setAutoCreateRowSorter(true); tblPlayers.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N tblPlayers.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); tblPlayersScroll.setViewportView(tblPlayers); tblPlayers.getColumnModel().getSelectionModel() .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); jLabel3.setBackground(new java.awt.Color(68, 68, 68)); jLabel3.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N jLabel3.setForeground(new java.awt.Color(255, 255, 255)); jLabel3.setText("Number of Players:"); txtNumPlayers.setEditable(false); txtNumPlayers.setBackground(new java.awt.Color(255, 255, 255)); txtNumPlayers.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(tblPlayersScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 329, Short.MAX_VALUE) .addGroup(jPanel2Layout.createSequentialGroup().addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtNumPlayers, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0))) .addContainerGap())); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap() .addComponent(tblPlayersScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3).addComponent(txtNumPlayers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); jTabbedPane1.addTab("Player List", jPanel2); jPanel1.setBackground(new java.awt.Color(68, 68, 68)); jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(68, 68, 68))); chkIgnorePlayerCommands.setBackground(new java.awt.Color(68, 68, 68)); chkIgnorePlayerCommands.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N chkIgnorePlayerCommands.setForeground(new java.awt.Color(255, 255, 255)); chkIgnorePlayerCommands.setSelected(true); chkIgnorePlayerCommands.setText("Ignore \"[PLAYER_COMMAND]\" messages"); chkIgnoreServerCommands.setBackground(new java.awt.Color(68, 68, 68)); chkIgnoreServerCommands.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N chkIgnoreServerCommands.setForeground(new java.awt.Color(255, 255, 255)); chkIgnoreServerCommands.setSelected(true); chkIgnoreServerCommands.setText("Ignore \"issued server command\" messages"); chkIgnoreServerCommands.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkIgnoreServerCommandsActionPerformed(evt); } }); chkShowChatOnly.setBackground(new java.awt.Color(68, 68, 68)); chkShowChatOnly.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N chkShowChatOnly.setForeground(new java.awt.Color(255, 255, 255)); chkShowChatOnly.setText("Show chat only"); chkShowChatOnly.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkShowChatOnlyActionPerformed(evt); } }); chkIgnoreErrors.setBackground(new java.awt.Color(68, 68, 68)); chkIgnoreErrors.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N chkIgnoreErrors.setForeground(new java.awt.Color(255, 255, 255)); chkIgnoreErrors.setText("Ignore warnings and errors"); chkIgnoreErrors.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkIgnoreErrorsActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(chkIgnorePlayerCommands).addComponent(chkIgnoreServerCommands) .addComponent(chkShowChatOnly).addComponent(chkIgnoreErrors)) .addContainerGap(68, Short.MAX_VALUE))); jPanel1Layout .setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addComponent(chkIgnorePlayerCommands, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(chkIgnoreServerCommands, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(chkShowChatOnly, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(chkIgnoreErrors, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(307, Short.MAX_VALUE))); jTabbedPane1.addTab("Filters", jPanel1); jPanel4.setBackground(new java.awt.Color(68, 68, 68)); jPanel4.setFont(new java.awt.Font("Lucida Sans Unicode", 0, 12)); // NOI18N favoriteButtonsPanelHolder.setLayout(new java.awt.BorderLayout()); favoriteButtonsPanelScroll.setBorder(null); favoriteButtonsPanel.setBackground(new java.awt.Color(68, 68, 68)); favoriteButtonsPanel.setLayout(null); favoriteButtonsPanelScroll.setViewportView(favoriteButtonsPanel); favoriteButtonsPanelHolder.add(favoriteButtonsPanelScroll, java.awt.BorderLayout.CENTER); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout .setHorizontalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout .createSequentialGroup().addGap(0, 0, 0).addComponent(favoriteButtonsPanelHolder, javax.swing.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE) .addGap(0, 0, 0))); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap() .addComponent(favoriteButtonsPanelHolder, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); jTabbedPane1.addTab("Commands", jPanel4); splitPane.setRightComponent(jTabbedPane1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(0, 0, 0).addComponent(splitPane).addGap(0, 0, 0))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(splitPane, javax.swing.GroupLayout.Alignment.TRAILING)); pack(); }
From source file:serial.ChartFromSerial.java
/** * 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./*from w w w . ja va2 s. c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); refreshButton = new javax.swing.JButton(); portList_jCombo = new javax.swing.JComboBox(); baudRate_jCombo = new javax.swing.JComboBox(); connect_jBtn = new javax.swing.JButton(); pause_jBtn = new javax.swing.JButton(); autoScroll_chkBx = new javax.swing.JCheckBox(); toTopText = new javax.swing.JButton(); toBotText = new javax.swing.JButton(); textPanel = new javax.swing.JPanel(); chartPanel = new javax.swing.JPanel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Java/Arduino Interfacing Attempt"); setName("window"); // NOI18N setResizable(false); jPanel1.setMaximumSize(new java.awt.Dimension(698, 445)); jPanel1.setMinimumSize(new java.awt.Dimension(698, 445)); jPanel1.setPreferredSize(new java.awt.Dimension(698, 445)); refreshButton.setText("Refresh Port List"); refreshButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { refreshButtonActionPerformed(evt); } }); portList_jCombo.setToolTipText(""); portList_jCombo.setName(""); // NOI18N portList_jCombo.setPreferredSize(new java.awt.Dimension(74, 25)); baudRate_jCombo.setModel( new javax.swing.DefaultComboBoxModel(new String[] { "300", "600", "1200", "2400", "4800", "9600", "14400", "19200", "28800", "31250", "38400", "57600", "115200", "230400", "250000" })); baudRate_jCombo.setSelectedIndex(5); baudRate_jCombo.setToolTipText(""); baudRate_jCombo.setName(""); // NOI18N baudRate_jCombo.setPreferredSize(new java.awt.Dimension(74, 25)); connect_jBtn.setText("Connect"); connect_jBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { connect_jBtnActionPerformed(evt); } }); pause_jBtn.setText("Pause"); pause_jBtn.setEnabled(false); pause_jBtn.setPreferredSize(new java.awt.Dimension(74, 25)); pause_jBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pause_jBtnActionPerformed(evt); } }); autoScroll_chkBx.setText("AutoScroll"); autoScroll_chkBx.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); autoScroll_chkBx.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { autoScroll_chkBxActionPerformed(evt); } }); toTopText.setText("Top"); toTopText.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { toTopTextActionPerformed(evt); } }); toBotText.setText("Bottom"); toBotText.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { toBotTextActionPerformed(evt); } }); textPanel.setAutoscrolls(true); textPanel.setLayout(new java.awt.BorderLayout()); chartPanel.setPreferredSize(new java.awt.Dimension(600, 254)); chartPanel.setLayout(new java.awt.BorderLayout()); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(textPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(refreshButton, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createSequentialGroup().addComponent(autoScroll_chkBx) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(toTopText) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(toBotText))) .addGap(0, 0, Short.MAX_VALUE))) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(portList_jCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(baudRate_jCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(connect_jBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(pause_jBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(chartPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 463, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { baudRate_jCombo, connect_jBtn, pause_jBtn, portList_jCombo }); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(connect_jBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(portList_jCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(pause_jBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(baudRate_jCombo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(refreshButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(chartPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(2, 2, 2)) .addGroup(jPanel1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(autoScroll_chkBx).addComponent(toTopText) .addComponent(toBotText)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(textPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 370, javax.swing.GroupLayout.PREFERRED_SIZE))))); jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { baudRate_jCombo, connect_jBtn, pause_jBtn, portList_jCombo }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addGap(0, 0, 0))); pack(); }
From source file:Import.pnl_import_vcf.java
/** * 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./* w w w.j a va 2 s. c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { btn_group_choose_key = new javax.swing.ButtonGroup(); btn_group_choose_import_type = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); tbl_hbase_tables = new com.jidesoft.grid.SortableTable(); chooseLable = new javax.swing.JLabel(); filePathField = new javax.swing.JTextField(); chooseFile = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); list_dual_hbase_column_family = new com.jidesoft.list.DualList(); jPanel5 = new javax.swing.JPanel(); rbt_new_tbl = new javax.swing.JRadioButton(); rbt_existing_tbl = new javax.swing.JRadioButton(); btn_import = new javax.swing.JButton(); jScrollPane1.setBorder(javax.swing.BorderFactory.createTitledBorder("HBase Tables Available")); tbl_hbase_tables.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { })); jScrollPane1.setViewportView(tbl_hbase_tables); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 657, Short.MAX_VALUE) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE)); chooseLable.setText("Please specify the corresponding VCF file:"); chooseFile.setText("Choose"); chooseFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chooseFileActionPerformed(evt); } }); jScrollPane3.setViewportView(list_dual_hbase_column_family); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel2Layout .createSequentialGroup().addContainerGap().addComponent(jScrollPane3).addContainerGap())); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)); jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Choose Import Type")); btn_group_choose_import_type.add(rbt_new_tbl); rbt_new_tbl.setSelected(true); rbt_new_tbl.setText("Import to a new HBase table"); btn_group_choose_import_type.add(rbt_existing_tbl); rbt_existing_tbl.setText("Import to an existing HBase table"); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout .setHorizontalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap().addComponent(rbt_new_tbl) .addGap(18, 18, 18).addComponent(rbt_existing_tbl) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(rbt_new_tbl).addComponent(rbt_existing_tbl))); btn_import.setText("Import"); btn_import.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btn_importActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(chooseLable) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(filePathField) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(chooseFile)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE).addComponent(btn_import))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chooseLable) .addComponent(filePathField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(chooseFile)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btn_import) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { chooseFile, chooseLable, filePathField }); }
From source file:GUI.GraphicalInterface.java
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { savesJFileChooser = new javax.swing.JFileChooser(); workdirJFileChooser = new javax.swing.JFileChooser(); jColorChooser1 = new javax.swing.JColorChooser(); jPanel3 = new javax.swing.JPanel(); clearJCheckBox = new javax.swing.JCheckBox(); saveJCheckBox = new javax.swing.JCheckBox(); historyJCheckBox = new javax.swing.JCheckBox(); maxtimeJSlider = new javax.swing.JSlider(); adminJLabel = new javax.swing.JLabel(); rootJCheckBox = new javax.swing.JCheckBox(); rootPasswordJLabel = new javax.swing.JLabel(); passwordJTextField = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); clearargJCheckBox = new javax.swing.JCheckBox(); jPanel4 = new javax.swing.JPanel(); manualJRadioButton = new javax.swing.JRadioButton(); commandJTextField = new javax.swing.JTextField(); executeManualJButton = new javax.swing.JButton(); optionJLabel = new javax.swing.JLabel(); optionJTextField = new javax.swing.JTextField(); argumentJLabel = new javax.swing.JLabel(); argumentJTextField = new javax.swing.JTextField(); commandJComboBox = new javax.swing.JComboBox(); listJRadioButton = new javax.swing.JRadioButton(); optionJComboBox = new javax.swing.JComboBox(); executeJButton = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); clearJButton = new javax.swing.JButton(); showHistoryJButton = new javax.swing.JButton(); clearHistoryJButton = new javax.swing.JButton(); saveButton = new javax.swing.JButton(); abortJButton = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); statusJLabel = new javax.swing.JLabel(); statusJProgressBar = new javax.swing.JProgressBar(); jTabbedPane1 = new javax.swing.JTabbedPane(); jScrollPane1 = new javax.swing.JScrollPane(); terminalJTextArea = new javax.swing.JTextArea(); jScrollPane2 = new javax.swing.JScrollPane(); descriptionJTextArea = new javax.swing.JTextArea(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItem2 = new javax.swing.JMenuItem(); jMenuItem1 = new javax.swing.JMenuItem(); jMenu3 = new javax.swing.JMenu(); jMenuItem7 = new javax.swing.JMenuItem(); jMenuItem6 = new javax.swing.JMenuItem(); jCheckBoxMenuItem1 = new javax.swing.JCheckBoxMenuItem(); jMenu2 = new javax.swing.JMenu(); jMenuItem5 = new javax.swing.JMenuItem(); jMenuItem4 = new javax.swing.JMenuItem(); jMenuItem3 = new javax.swing.JMenuItem(); savesJFileChooser.setDialogType(javax.swing.JFileChooser.SAVE_DIALOG); workdirJFileChooser.setDialogType(javax.swing.JFileChooser.CUSTOM_DIALOG); workdirJFileChooser.setApproveButtonText("Select directory"); workdirJFileChooser.setApproveButtonToolTipText("Choose working directory for command execution"); workdirJFileChooser.setDialogTitle("Choose working directory"); workdirJFileChooser.setFileFilter(null); workdirJFileChooser.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Grafcom Graphical Commander"); setResizable(false);/*from www.j a v a 2s . c om*/ jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); clearJCheckBox.setText("Clear terminal before executing command"); clearJCheckBox.setFocusPainted(false); saveJCheckBox.setText("Open file after saving"); saveJCheckBox.setFocusPainted(false); historyJCheckBox.setText("Do not save command history"); historyJCheckBox.setFocusPainted(false); historyJCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { historyJCheckBoxActionPerformed(evt); } }); maxtimeJSlider.setMajorTickSpacing(3); maxtimeJSlider.setMaximum(21); maxtimeJSlider.setMinimum(3); maxtimeJSlider.setPaintLabels(true); maxtimeJSlider.setSnapToTicks(true); maxtimeJSlider.setValue(3); maxtimeJSlider.setFocusable(false); adminJLabel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N adminJLabel.setText("Superuser privileges (Linux-based systems only)"); rootJCheckBox.setText("Run command as root"); rootJCheckBox.setFocusPainted(false); rootJCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rootJCheckBoxActionPerformed(evt); } }); rootPasswordJLabel.setText("root password:"); passwordJTextField.setForeground(new java.awt.Color(254, 254, 254)); passwordJTextField .setToolTipText("Enter password here. Password not visible due to security considerations"); passwordJTextField.setEnabled(false); passwordJTextField.setSelectionColor(new java.awt.Color(254, 254, 254)); jLabel2.setText("Set command execution timeout (seconds)"); clearargJCheckBox.setText("Clear command arguments after execution"); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(rootJCheckBox).addComponent(adminJLabel) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(clearargJCheckBox).addComponent(saveJCheckBox) .addComponent(historyJCheckBox).addComponent(clearJCheckBox)) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(rootPasswordJLabel).addGap(4, 4, 4).addComponent( passwordJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addGroup(jPanel3Layout.createSequentialGroup().addGap(37, 37, 37).addComponent( maxtimeJSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup().addGap(76, 76, 76).addComponent(jLabel2))) .addGap(52, 52, 52))); jPanel3Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { clearJCheckBox, historyJCheckBox, saveJCheckBox }); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addComponent(jLabel2) .addGap(2, 2, 2) .addComponent(maxtimeJSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(clearJCheckBox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(clearargJCheckBox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(saveJCheckBox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(historyJCheckBox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE) .addComponent(adminJLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(rootJCheckBox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(rootPasswordJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(passwordJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); manualJRadioButton.setText("Type command manually"); manualJRadioButton.setFocusPainted(false); manualJRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { manualJRadioButtonActionPerformed(evt); } }); commandJTextField.setToolTipText("Enter command to execute"); executeManualJButton.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Resources/icon/utilities-terminal16x16.png"))); // NOI18N executeManualJButton.setText("Execute"); executeManualJButton.setFocusPainted(false); executeManualJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { executeManualJButtonActionPerformed(evt); } }); optionJLabel.setText("option argument:"); optionJTextField.setToolTipText("Specify the argument for the selected option"); optionJTextField.setEnabled(false); argumentJLabel.setText("command argument:"); argumentJTextField.setToolTipText("Specify the argument for the selected command"); argumentJTextField.setEnabled(false); commandJComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "(Select command)" })); commandJComboBox.setToolTipText("Select command to execute"); commandJComboBox.setFocusable(false); commandJComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { commandJComboBoxActionPerformed(evt); } }); listJRadioButton.setSelected(true); listJRadioButton.setText("Select command from list"); listJRadioButton.setFocusPainted(false); listJRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { listJRadioButtonActionPerformed(evt); } }); optionJComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "(Select option)" })); optionJComboBox.setToolTipText("Choose option for the selected command"); optionJComboBox.setEnabled(false); optionJComboBox.setFocusable(false); executeJButton.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Resources/icon/utilities-terminal16x16.png"))); // NOI18N executeJButton.setText("Execute"); executeJButton.setToolTipText("Click to execute command with the given parameters"); executeJButton.setEnabled(false); executeJButton.setFocusPainted(false); executeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { executeJButtonActionPerformed(evt); } }); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Resources/icon/folder.png"))); // NOI18N jButton1.setText("Set command execution path..."); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap().addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(argumentJLabel).addComponent(optionJLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(argumentJTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE) .addComponent(optionJTextField)) .addGap(113, 113, 113)) .addGroup(jPanel4Layout.createSequentialGroup().addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(listJRadioButton) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(commandJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(optionJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(executeJButton)) .addComponent(manualJRadioButton) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(commandJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(executeManualJButton)) .addGroup(jPanel4Layout.createSequentialGroup().addGap(79, 79, 79) .addComponent(jButton1))) .addContainerGap())))); jPanel4Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { argumentJLabel, optionJLabel }); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addContainerGap().addComponent(listJRadioButton).addGap(4, 4, 4) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(commandJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(optionJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(executeJButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(argumentJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(argumentJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(optionJTextField).addComponent(optionJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(7, 7, 7).addComponent(manualJRadioButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(commandJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(executeManualJButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jButton1) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel4Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { argumentJTextField, optionJTextField }); clearJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Resources/icon/edit-clear.png"))); // NOI18N clearJButton.setText("Clear Terminal"); clearJButton.setToolTipText("Click to clear terminal output"); clearJButton.setFocusPainted(false); clearJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearJButtonActionPerformed(evt); } }); showHistoryJButton.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Resources/icon/format-justify-fill.png"))); // NOI18N showHistoryJButton.setText("Show history"); showHistoryJButton.setToolTipText("Click to display the list of commands executed"); showHistoryJButton.setFocusPainted(false); showHistoryJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { showHistoryJButtonActionPerformed(evt); } }); clearHistoryJButton .setIcon(new javax.swing.ImageIcon(getClass().getResource("/Resources/icon/edit-clear.png"))); // NOI18N clearHistoryJButton.setText("Clear History"); clearHistoryJButton.setFocusPainted(false); clearHistoryJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearHistoryJButtonActionPerformed(evt); } }); saveButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Resources/icon/media-floppy.png"))); // NOI18N saveButton.setText("Save to file..."); saveButton.setFocusPainted(false); saveButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveButtonActionPerformed(evt); } }); abortJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Resources/icon/process-stop.png"))); // NOI18N abortJButton.setText("Abort"); abortJButton.setToolTipText("Abort command execution"); abortJButton.setEnabled(false); abortJButton.setFocusPainted(false); abortJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { abortJButtonActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addGap(13, 13, 13).addComponent(clearJButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(showHistoryJButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(clearHistoryJButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(saveButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(abortJButton) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(clearJButton).addComponent(showHistoryJButton) .addComponent(clearHistoryJButton).addComponent(saveButton).addComponent(abortJButton))); jPanel1.setBackground(new java.awt.Color(51, 51, 51)); statusJLabel.setForeground(new java.awt.Color(255, 255, 255)); statusJLabel.setText("Select command from drop-down list or type manually to execute."); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addComponent(statusJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(statusJProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(statusJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE) .addComponent(statusJProgressBar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); terminalJTextArea.setEditable(false); terminalJTextArea.setBackground(new java.awt.Color(51, 51, 51)); terminalJTextArea.setColumns(20); terminalJTextArea.setFont(new java.awt.Font("Consolas", 0, 13)); // NOI18N terminalJTextArea.setForeground(new java.awt.Color(204, 204, 204)); terminalJTextArea.setLineWrap(true); terminalJTextArea.setRows(5); terminalJTextArea.setTabSize(3); terminalJTextArea.setToolTipText("Displays output of command executed"); terminalJTextArea.setCaretColor(new java.awt.Color(204, 204, 204)); terminalJTextArea.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); terminalJTextArea.setMargin(new java.awt.Insets(8, 4, 4, 4)); terminalJTextArea.setSelectionColor(new java.awt.Color(153, 153, 153)); jScrollPane1.setViewportView(terminalJTextArea); jTabbedPane1.addTab("Terminal Emulator", jScrollPane1); jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); descriptionJTextArea.setEditable(false); descriptionJTextArea.setColumns(20); descriptionJTextArea.setFont(new java.awt.Font("Consolas", 0, 13)); // NOI18N descriptionJTextArea.setLineWrap(true); descriptionJTextArea.setRows(5); descriptionJTextArea.setTabSize(3); descriptionJTextArea.setToolTipText("Description of selected command and its options"); descriptionJTextArea.setWrapStyleWord(true); descriptionJTextArea.setCaretColor(new java.awt.Color(255, 255, 255)); descriptionJTextArea.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); descriptionJTextArea.setFocusable(false); descriptionJTextArea.setMargin(new java.awt.Insets(4, 4, 4, 4)); descriptionJTextArea.setSelectionColor(new java.awt.Color(51, 204, 255)); jScrollPane2.setViewportView(descriptionJTextArea); jTabbedPane1.addTab("Command Description", jScrollPane2); jMenu1.setText("File"); jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem2.setText("Save output to file..."); jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed(evt); } }); jMenu1.add(jMenuItem2); jMenuItem1.setText("Exit"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu1.add(jMenuItem1); jMenuBar1.add(jMenu1); jMenu3.setText("Settings"); jMenuItem7.setText("Terminal background color"); jMenuItem7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem7ActionPerformed(evt); } }); jMenu3.add(jMenuItem7); jMenuItem6.setText("Terminal text color"); jMenuItem6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem6ActionPerformed(evt); } }); jMenu3.add(jMenuItem6); jCheckBoxMenuItem1.setSelected(true); jCheckBoxMenuItem1.setText("Sounds"); jCheckBoxMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBoxMenuItem1ActionPerformed(evt); } }); jMenu3.add(jCheckBoxMenuItem1); jMenuBar1.add(jMenu3); jMenu2.setText("Help"); jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0)); jMenuItem5.setText("Grafcom help contents"); jMenuItem5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem5ActionPerformed(evt); } }); jMenu2.add(jMenuItem5); jMenuItem4.setText("Project Homepage"); jMenuItem4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem4ActionPerformed(evt); } }); jMenu2.add(jMenuItem4); jMenuItem3.setText("About"); jMenuItem3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem3ActionPerformed(evt); } }); jMenu2.add(jMenuItem3); jMenuBar1.add(jMenu2); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 372, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTabbedPane1)) .addGap(11, 11, 11)) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18).addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addComponent(jTabbedPane1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); pack(); setLocationRelativeTo(null); }
From source file:com.pianobakery.complsa.LicenseKeyGUI.java
/** * Following "Generated Code" is generated by Netbeans form editor. *//*from ww w . j ava 2 s . co m*/ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); licenseExpirationDatejTextField = new javax.swing.JTextField(); licenseStatusjTextField = new javax.swing.JTextField(); closejButton = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jLabel4 = new javax.swing.JLabel(); namejTextField = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); emailjTextField = new javax.swing.JTextField(); companyjTextField = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); changeProductKeyjButton = new javax.swing.JButton(); activatejButton = new javax.swing.JButton(); useTrialButton = new javax.swing.JButton(); buyButton = new javax.swing.JButton(); progressjLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Licensing"); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Product License Information")); jLabel1.setText("License Status:"); jLabel2.setText("License Expiration Date:"); licenseExpirationDatejTextField.setEditable(false); licenseStatusjTextField.setEditable(false); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(20, 20, 20) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel2).addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(licenseExpirationDatejTextField) .addComponent(licenseStatusjTextField)) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1) .addComponent(licenseStatusjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(licenseExpirationDatejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); closejButton.setText("Close"); closejButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closejButtonActionPerformed(evt); } }); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Product is Licensed to")); jLabel4.setText("Name:"); namejTextField.setEditable(false); jLabel5.setText("e-mail:"); emailjTextField.setEditable(false); companyjTextField.setEditable(false); jLabel6.setText("Company:"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addGap(87, 87, 87) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(namejTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(emailjTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(companyjTextField, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap())); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4).addComponent(namejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5).addComponent(emailjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6).addComponent(companyjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); changeProductKeyjButton.setText("Change Product Key"); changeProductKeyjButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { changeProductKeyjButtonActionPerformed(evt); } }); useTrialButton.setText("Use 30 Day Trial"); useTrialButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { useTrialKeyButtonActionPerformed(e); } }); buyButton.setText("Buy License"); buyButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buyButtonActionPerformed(e); } }); activatejButton.setText("Activate"); activatejButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { activatejButtonActionPerformed(evt); } }); progressjLabel.setForeground(Color.red); progressjLabel.setText(" "); 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) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(progressjLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE) .addGap(18, 18, 18).addComponent(buyButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(useTrialButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(activatejButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(changeProductKeyjButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(closejButton)) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(closejButton).addComponent(changeProductKeyjButton) .addComponent(activatejButton).addComponent(progressjLabel) .addComponent(useTrialButton).addComponent(buyButton)) .addContainerGap())); layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { useTrialButton, activatejButton, changeProductKeyjButton, closejButton }); pack(); }