• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Background problem in Windows XP with Theme

 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 986
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't have an XP box, but does comp.setOpaque(true) help?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic