title: JTable Tooltip from sql?
body: <p>I have been bugging with this for 2 days now. I have a <code>JTable</code> that is being generated with SQL from two tables. </p>
  
  <p>The thing is I now need to get a <code>Mouseover</code> tooltip to work, with specific information from one of the tables. And its not working.</p>
  
  <pre><code>public class Ausgabe extends JPanel {
  
      public JPanel panel1;
      private Point hintCell;
  
      Main j;
  
      MA ali = new MA();
  
      public Ausgabe(Main j) {
          this.j = j;
  
      }
  
      public void createDefault (){
          panel1 = new JPanel();
          panel1.setLayout( null );
  
          JLabel lblDieseMitarbeiterSind = new JLabel("Diese Mitarbeiter sind Heute abwesend.");
          lblDieseMitarbeiterSind.setBounds(10, 11, 239, 14);
          panel1.add(lblDieseMitarbeiterSind);
  
          panel1.add(getHeute());
      }
      public JTable getHeute(){
  
              DBconnect verbinden = new DBconnect();
              verbinden.erstelleVerbindung();
  
              JTable Habwesend=new JTable();
              Habwesend.setBounds(10, 30, 200, 400);
              Habwesend.setEnabled(false);
              DefaultTableModel dm=new DefaultTableModel();
  
              try {
              ResultSet rs= verbinden.sqlStatement.executeQuery("select Vor, Nach from MA_Tabelle where MA_ID in (select distinct MA_ID from AB_Spanne where(Date() &gt;= Start and Date() &lt;= Ende)) ");
              ResultSetMetaData rsmd=rs.getMetaData();
              //Coding to get columns-
              int cols=rsmd.getColumnCount();
              String c[]=new String[cols];
              for(int i=0;i&lt;cols;i++){
                  c[i]=rsmd.getColumnName(i+1);
                  for (int k = 0; k &lt; c.length; k++) {
                      dm.addColumn(c[k]);
                  }
  
  
              }
              Object row[]=new Object[cols];
              while(rs.next()){
                  for(int i=0;i&lt;cols;i++){
                          row[i]=rs.getString(i+1);
                      }
                  dm.addRow(row);
  
              }
  
              Habwesend.setModel(dm);
              Habwesend.setToolTipText(getToolTipText((MouseEvent) verbinden.sqlStatement.executeQuery("select Start, Ende from AB_Spanne where MA_ID = "+rs)));
              verbinden.schliesseVerbindung();
  
  
              }catch(SQLException e){
                  System.out.println("this failed");
                  System.out.print(e);
              }
              return Habwesend;
          }
  
      public String result() {
          // TODO Auto-generated method stub
          return null;
      }
  }
  </code></pre>
  
  <p>hope someone can help me. </p>
  
  <p>Thanks in advance.</p>