Closedown
This commit is contained in:
@@ -146,6 +146,7 @@ public class TestingList extends Panel {
|
||||
jButton1 = new javax.swing.JButton();
|
||||
jScrollPane2 = new javax.swing.JScrollPane();
|
||||
jTable1 = new javax.swing.JTable();
|
||||
jCheckBox1 = new javax.swing.JCheckBox();
|
||||
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
|
||||
@@ -189,6 +190,14 @@ public class TestingList extends Panel {
|
||||
}
|
||||
|
||||
add(jScrollPane2, java.awt.BorderLayout.PAGE_END);
|
||||
|
||||
jCheckBox1.setText("Select all");
|
||||
jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jCheckBox1ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
add(jCheckBox1, java.awt.BorderLayout.LINE_START);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
||||
@@ -208,9 +217,19 @@ public class TestingList extends Panel {
|
||||
SwingUtils.showException(this, ex);
|
||||
}
|
||||
}//GEN-LAST:event_jButton1ActionPerformed
|
||||
|
||||
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
|
||||
int rowD=-1, colT=0;
|
||||
//search for device name in table
|
||||
for (int row = 0; row <= jTable1.getRowCount() - 1; row++) {
|
||||
|
||||
jTable1.setValueAt(this.jCheckBox1.isSelected(), rowD, colT);
|
||||
}
|
||||
}//GEN-LAST:event_jCheckBox1ActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JCheckBox jCheckBox1;
|
||||
private javax.swing.JScrollPane jScrollPane2;
|
||||
private javax.swing.JTable jTable1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
Reference in New Issue
Block a user