• Post Reply Bookmark Topic Watch Topic
  • New Topic

Background problem in Windows XP with Theme

 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am using a TableCellEditor for my JTable , where i am setting the backgroung color of the component . My OS is windows XP and it works fine if i am using the Windows Classic Style theme .

But if i shift to Windows XP themes (default windows provides) , background color is not set properly.

Here is peice of TableCellEditor

public Component getTableCellEditorComponent (JTable table,
Object value, boolean isSelected, int row, int column)
{
final JComponent comp = (JComponent) super
.getTableCellEditorComponent(table, value, isSelected, row,
column);
comp.setBackground(new Color(250, 250, 150));
return comp;
}

Any help on this would be appreciated .

thanks
Sreenath
 
Brian Cole
Author
Ranch Hand
Posts: 920
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have an XP box, but does comp.setOpaque(true) help?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!