Results 1 to 3 of 3
  1. #1
    fossildoc is offline Member
    Join Date
    Dec 2008
    Posts
    3
    Rep Power
    0

    Default tooltips for JTable column headers

    I change the column headers in a JTable according to the value in a particular column of the selected row. The headers are abbreviations, so I would like to set explanatory tool tips each time I change the headers.

    Tool tips can be set only for JComponents (and a couple of unrelated classes). The logical candidates for drawing column headers, like the table column model and the header renderer, are not JComponents.

    Does anyone know how I can set tool tips for individual column headers?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,305
    Rep Power
    20

    Default

    JTableHeader is a JComponent.

    db

  3. #3
    fossildoc is offline Member
    Join Date
    Dec 2008
    Posts
    3
    Rep Power
    0

    Default

    Thank you for responding.

    I know that JTableHeader is a JComponent, but it doesn't have a method for setting tool tips for individual columns. The column models and their renderers are not JComponents and therefore do not support a setToolTip() method.

Similar Threads

  1. insert row and column and delete row and column
    By daredavil82 in forum New To Java
    Replies: 13
    Last Post: 09-22-2011, 06:10 PM
  2. How to sort column in JTable
    By johnt in forum AWT / Swing
    Replies: 3
    Last Post: 06-14-2008, 05:48 AM
  3. Replies: 2
    Last Post: 05-15-2008, 10:15 AM
  4. Excel Column
    By Gajesh Tripathi in forum New To Java
    Replies: 2
    Last Post: 04-13-2008, 02:26 PM
  5. CSV column titles
    By javaplus in forum New To Java
    Replies: 2
    Last Post: 01-24-2008, 03:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •