Results 1 to 3 of 3
  1. #1
    Levian is offline Senior Member
    Join Date
    Jun 2011
    Posts
    109
    Rep Power
    0

    Default Changing header with one tablemodel

    Is there any method to change header so that one model that is used many times can display different headers depends on the one that call it ?


    Thanks in advance,

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,762
    Rep Power
    7

    Default

    By headers do you mean the name of the columns? The DefaultTableModel class has a setColumnIdentifiers method. Perhaps this will do what you want.

  3. #3
    Levian is offline Senior Member
    Join Date
    Jun 2011
    Posts
    109
    Rep Power
    0

    Default

    Yes, table column header
    My table model is extended from AbstractTableModel

Similar Threads

  1. TableModel initialize/delete
    By hddbogdan in forum AWT / Swing
    Replies: 2
    Last Post: 04-11-2011, 06:27 PM
  2. TableModel and TableCellRenderer problem
    By cpliu903 in forum AWT / Swing
    Replies: 1
    Last Post: 03-06-2011, 11:32 AM
  3. Map in TableModel
    By tiro in forum AWT / Swing
    Replies: 1
    Last Post: 07-01-2009, 07:53 AM
  4. Swing problem: JTable/TableModel
    By Levish2002 in forum AWT / Swing
    Replies: 2
    Last Post: 08-24-2008, 08:53 PM
  5. Create different instance of a tablemodel
    By Bill in forum AWT / Swing
    Replies: 6
    Last Post: 03-27-2008, 03:49 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
  •