Solved

AWT Button  without Color ???

Posted on 1997-09-25
3
268 Views
Last Modified: 2006-11-17
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
Comment
Question by:maiert
3 Comments
 

Author Comment

by:maiert
ID: 1227523
Edited text of question
0
 
LVL 10

Expert Comment

by:kollegov
ID: 1227524
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
 
LVL 1

Accepted Solution

by:
mnelson051997 earned 100 total points
ID: 1227525
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now