Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void AddToListCheckedChB(JCheckBox...listChB){
- ArrayList<Integer> ListOfIndexesCheckedBox=new ArrayList<>();
- for(int i=0;i<listChB.length;i++){
- if(listChB[i].isSelected()==true)
- ListOfIndexesCheckedBox.add(i);
- }
- int[] tab = new int[ListOfIndexesCheckedBox.size()]; //I need in this place table of primitive int values for other function addOrder()
- for(int j=0;j<ListOfIndexesCheckedBox.size();j++){
- tab[j]=ListOfIndexesCheckedBox.get(j).intValue();
- }
- Orders.addOrder(tab);
- //System.out.println("dodano");
- }
- private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
- AddToListCheckedChB(jCheckBox1,jCheckBox2,jCheckBox3,jCheckBox4,jCheckBox5,jCheckBox6,jCheckBox7,jCheckBox8,jCheckBox9,jCheckBox10,jCheckBox11);
- System.out.println(Orders.activeOrders);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement