1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
titreTab=new Vector();
titreTab.addElement("Option");
titreTab.addElement("Value");
modelTab = new DefaultTableModel(new Vector(), titreTab) {
/**
*
*/
private static final long serialVersionUID = 1L;
boolean[] canEdit = new boolean[] { false, false};
Class[] types = new Class[] { java.lang.String.class,
String.class };
public Class getColumnClass(int columnIndex) {
return types[columnIndex];
}
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit[columnIndex];
}
};
table_globalOptions = new JTable(modelTab);
//table_globalOptions.getTableHeader().setReorderingAllowed(false);
table_globalOptions.setBackground(Color.LIGHT_GRAY);
table_globalOptions.setModel(modelTab);
table_globalOptions.setBounds(0, 81, 540, 80);
this.add(table_globalOptions); |