Solved

AWT Button  without Color ???

Posted on 1997-09-25
3
281 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
servlet example 11 59
Is there a simpler dropbox system? 10 44
java example issue 5 45
Java pass by reference 3 21
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

733 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