Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic