Click to See Complete Forum and Search --> : Swing questions: JTable


Flesh
January 10th, 2003, 10:47 AM
Is there an effective and easy method to change the color of a row in a JTable? JTable enables you to access a cell, but not a row specifically. I would also like to be able to access a row via it's index and return the results as a vector. Although, I'm writing my own function to do this now. Thanks.

Goodz13
January 10th, 2003, 12:32 PM
Have a look at TableCellRenderers, and Creating your own TableModel.
http://java.sun.com/j2se/1.4/docs/api/javax/swing/table/TableCellRenderer.html
http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/table/TableModel.html
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

and
http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_10351103.html