Oct 13

You need to subclass JTable and override the method getToolTipText().

JTable table = new JTable(model)
    public String getToolTipText(MouseEvent event)
        int col  = convertColumnIndexToModel(
        return getColumnName(col);

written by objects \\ tags: ,

Sep 23

Swing uses the UIManager class to store defaults. Its put() method can be used to change these values.

// Change the default foreground color for tooltips

UIManager.put("ToolTip.foreground", Color.red);

// Change the default background color for tooltips

UIManager.put("ToolTip.background", Color.white); 

written by objects \\ tags: