1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
JTable jTable2 = new JTable();
this.jTable2 = jTable2;
JScrollPane jScrollPane12 = new JScrollPane();
String[] titreColonnes = { "Numero du chantier", "Nom du chantier", "Client","Calculateur", "Dessinateur"};
this.jTable2.setModel(new MyTableModel(/*chelou,*/ titreColonnes));
this.jTable2.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
TableColumn col;
col = this.jTable2.getColumnModel().getColumn(0);
col.setPreferredWidth(60);
col = this.jTable2.getColumnModel().getColumn(1);
col.setPreferredWidth(350);
col = this.jTable2.getColumnModel().getColumn(2);
col.setPreferredWidth(110);
getContentPane().add(jScrollPane12,new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 20, 700, 500));
jScrollPane12.setOpaque(true);
this.jTable2.setOpaque(true);
jScrollPane12.setViewportView(this.jTable2);
this.jScrollPane2= jScrollPane12; |