Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Border in jtable cell

843806Feb 9 2009 — edited Feb 10 2009
I have a jtable cell with text information, and i use a renderer for change the background color of the cell, look similar this code:
   Component cell = super.getTableCellRendererComponent
            (table, "MY TEXT CELL", isSelected, hasFocus, row, column);
          cell.setFont(new Font("Dialog", 0, 10));
          cell.setBackground(Color.RED);
All the entire cell background i'ts filled with red color... but i want to leave a space not red with the limits of the cell, if it's possible in white color, like a "border background" cell, it's possible?

Thanks a lot!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 10 2009
Added on Feb 9 2009
5 comments
481 views