JTable Tool Tips

cs_Dellys Messages postés 95 Date d'inscription mercredi 26 octobre 2005 Statut Membre Dernière intervention 24 mars 2008 - 22 févr. 2007 à 16:23
thevman Messages postés 83 Date d'inscription lundi 5 septembre 2005 Statut Membre Dernière intervention 3 juillet 2008 - 23 févr. 2007 à 17:00
Bonjour

j'ai un jTable je voudrai qu'au passage de la sourie sur les lignes de la 5 éme colonne le contenu s'affiche dans un Tool Tips

voici mon jTable:

for (int i = 1; i <= 5; i++)
       {
           columnNames.addElement( md.getColumnName(i) );
       }
       while (rs.next())
       {
           Vector rowPP = new Vector(columnsPP);


           for (int i = 1; i <= 5; i++)
           {
               rowPP.addElement( rs.getObject(i) );
           }
           data.addElement( rowPP );
          }


       rs.close();
       stmt.close();
   }
   catch(Exception e1)
   {
       System.out.println( e1 );
   } catch (Throwable ex) {
 /** @todo Handle this exception */
}JTable tablePO = new JTable(data, columnNames);


  JScrollPane scrollanePO = new JScrollPane(tablePO );
           tablePO.setPreferredScrollableViewportSize(new Dimension(570, 50));
           jPanel10.add(jPanel4);
           jPanel4.add(scrollanePO, new GridBagConstraints(0, 0, 4, 1, 1.0, 1.0
               , GridBagConstraints.NORTH, GridBagConstraints.NONE,
               new Insets(9, 0, 14, 1), 108, 107));
       scrollanePO.getViewport().add(tablePO);
      

1 réponse

thevman Messages postés 83 Date d'inscription lundi 5 septembre 2005 Statut Membre Dernière intervention 3 juillet 2008
23 févr. 2007 à 17:00
plop!

peut etre que ce lien va t'aider :)
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#celltooltip

 Nare Trouvé !!!
0
Rejoignez-nous