Hi,
I have one issue related to JTree swing component, I want to use JTree under Windows high contrast Mode, but it never shows tree nodes according to windows High contrast theme.
Jtree view Under Normal Mode
Jtree view Under High Contrast Mode
Eclipse Package Explorer view Under Normal Mode
Eclipse Package Explorer view Under High Contrast Mode
I want to make my applications jtree view same as eclipse's "high contrast" view.
Can anybody guide on this?? I am trying to write a logic like:
// calling this On application load - or via some kind of listener
Toolkit toolkit = Toolkit.getDefaultToolkit();
Boolean highContrast = (Boolean)toolkit.getDesktopProperty( "win.highContrast.on" );
boolean flag=highContrast.booleanValue();
if(flag){
// do stuff for high contrast
}
else{
// show in normal mode
}
Thanks for your help!!