Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can i set an event for jtable header?

 
phooton misra
Ranch Hand
Posts: 52
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somebody please suggest me ,

can i set an event for jtable header?[color=green][/color][size=18][/size]
 
Tony Docherty
Bartender
Posts: 2989
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What sort of event are you wanting to set up? ie what are you trying to achieve?
 
phooton misra
Ranch Hand
Posts: 52
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi tony

In my table there is an alternative background colors for the rows and after sorting the background color should be cahnged with change of rows ?

suppose

row 1 green

row2 yellow

row 3 red

and after sorting it should be

row 3 red

row 2 yellow

row 1 green

but it is coming like this

row 3 green

row 2 yellow

row 1 red.
 
m Korbel
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- JTable can be sorted or filtered, JTable Columns can be reordered,

- then have to convert indexes betweens JTables view to the XxxTableModel or vice versa

- put and implements indexing inside XxxXxxRenderer



- for better help sooner post an (short, runnable, compilable) SSCCE, demonstrating your issue
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic