views:

61

answers:

1

I have an AWT text field that gets enabled and disabled based on the state of a Checkbox. On OSX when the TextField is disabled it gets ghosted but this does not occur on Windows 7. Is this how it is supposed to work on Windows? Is there a way to get the TextField to become ghosted on Windows. Note: We are doing a little maintenance on some very old code and for compatibility we must use AWT and cannot switch over to swing at this time.

+1  A: 

AWT gets look and feel from window manager of operating system.

On OSX disabled AWT text field looks ghosted because OSX window manager makes it look so.

So it wont be possible to bring ghosted effect but will look grayed out using AWT for disabled component on Windows 7.

YoK
As such, in Windows, it should be greyed out.
R. Bemrose
yes it should be grayed out.
YoK
Ah okay, I wasn't seeing the "greyed out" effect because I had the TextField inside a panel and I was enabling and disabling the panel. On OSX disabling the panel would ghost the TextField but on Windows disabling the panel does not "grey out" the TextField. Now I disable the TextField and the TextField is showing up greyed out which is quite acceptable. Thanks!
Mike2012