File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure 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
  • 0
  • 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
Pie
Posts: 2878
59
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic