Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

AWT Button  without Color ???

Posted on 1997-09-25
3
Medium Priority
?
304 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 300 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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…
Suggested Courses

618 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