Курсовая работа: Метод последовательных сравнений
Collections.sort(conditions, new Comparator<int[]>() {
public int compare(int[] o1, int[] o2) {
if( o1[0] < o2[0] ) {
return -1;
} else if( o1[0] == o2[0] ) {
if(o1.length < o2.length) {
return -1;
} else {
return 0;
}
} else {
return 1;
}
}
});
vec = new Vector<ConditionPanel>();
int num = 1;
for(int[] indices : conditions) {
ConditionPanel list = new ConditionPanel();
list.setCondition(indices, num);
num++;
vec.add(list);
}
jList1.setListData(vec);
jList1.updateUI();
}
private void jSpinner1StateChanged(javax.swing.event.ChangeEvent evt) {
jTable1.setModel(new DefaultTableModel((Integer)jSpinner1.getValue(), 3)
boolean[] canEdit = new boolean [] {