import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
+import javax.swing.ToolTipManager;
import javax.swing.border.Border;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
}
/**
- * Position the tooltip at the bottom edge of, and half way across, the
+ * Position the tooltip near the bottom edge of, and half way across, the
* current cell
*/
@Override
int column = table.columnAtPoint(point);
int row = table.rowAtPoint(point);
Rectangle r = getCellRect(row, column, false);
- Point loc = new Point(r.x + r.width / 2, r.y + r.height);
+ Point loc = new Point(r.x + r.width / 2, r.y + r.height - 3);
return loc;
}
};
table.getTableHeader().setFont(new Font("Verdana", Font.PLAIN, 12));
table.setFont(new Font("Verdana", Font.PLAIN, 12));
+ ToolTipManager.sharedInstance().registerComponent(table);
// table.setDefaultRenderer(Color.class, new ColorRenderer());
// table.setDefaultEditor(Color.class, new ColorEditor(this));