Thread View: borland.public.jbuilder.java.swing
1 messages
1 total messages
Started by Vander
Mon, 30 Jan 2006 11:27
TableCellRenderer and colours
Author: Vander
Date: Mon, 30 Jan 2006 11:27
Date: Mon, 30 Jan 2006 11:27
29 lines
1631 bytes
1631 bytes
DefaultTableCellRenderer does not seem to have correct color reporting.
Just try the following:
public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column )
{
Color color;
super.getTableCellRendererComponent( table, value, isSelected,
hasFocus, row, column );
color = getForeground();
setForeground( color );
return this;
}
This will produce garbage colouring because getForground() seems to
operate incorrectly. I need to know fore- and background colours of the
default cell rendering (look-and-feel dependent). How would I obtain
this information?
Thanks!
- Vander
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads