[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 307
  • Last Modified:

AWT Button without Color ???

I generate a AWT Button and want to change the Color
with, button.setBackground(Color.red) for example,
but the Background of the Button is allways lightGray.
What's  wrong ????
and How can I change the Color of a AWT Button ?
0
maiert
Asked:
maiert
1 Solution
 
maiertAuthor Commented:
Edited text of question
0
 
kollegovCommented:
I think that it's bug in JDK 1.02
for win95 (at least I checked it with this release), and
found this problem several months ago too

To make custom looking components
override Canvas.class :(
0
 
mnelson051997Commented:
You can't change an AWT Button's color.  Since it is done
with an OS-specific peer, it uses whatever the system thinks
is the correct color for a button.  You would have to make
your own button class - unquestionably a pain.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now