1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| ImageIcon img = new ImageIcon(JTableX.class.getResource("excel.gif"));
protected Object [][] m_odata = { {"lundi","beau temps",new Double(12.258),new Boolean(true),null},
{"mardi","beau temps",new Integer(30),new Boolean(false),null},
{"mercredi","beau temps",new Integer(16),new Boolean(true),null},
{"jeudi","beau temps",new Integer(18),new Boolean(false),null},
{"vendredi","beau temps",new Integer(2),new Boolean(true),null},
{"samedi","beau temps",new Integer(10),new Boolean(false),null},
{"dimanche","beau temps",new Integer(10),new Boolean(true),null}
};
protected String [] m_sentete = {"jour","météo","température","Libre?","image"};
private JTableX jTableX = new JTableX(m_odata,m_sentete);
for(int l=0; l<7; l++)
jTableX.setValueAt(img,l,4); |