This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

fill color in alternating rows in jtable

 
cchetan jain
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made a object of JTable.but now i want to avoid user editing and set the color to the alternate tables..
but problem is that this code gives the compile time error.
now how can i do it.
one solution to this problem is that i extends the JTable and override these methods..and then make a object of that..
bt i want to ask that is there another solution for that.
;
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> I have made a object of JTable.

where?

this line doesn't count
JTable jTable1=new jTable1();

there is no standard class called jTable1.

post what you really have, not merrily typing away from memory, and you might get a solution.

anyway, the code, in the right order, worked OK for me (alternating white/gray rows)

[edit]
and duplicating your post in Beginning Java, will just annoy 2 sets of people
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic