473,406 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Change look of disabled JButton

Hello

How can I change the look of a disabled JButton? I have made a boardgame
with a brown background and brown buttons. I have also put an imageicon on
the buttons that has a colored image on it. When I disable the buttons, the
colored image is turned into grey which screws up the look of my game.

Can I change the grey color on a disabled button? Or do I have to keep it
enabled, and attach another imageicon with different color to show the user
he can't click the button?

Also, I can sometimes see a blue/gray line around my buttons. I want to get
rid of it, so I guess it has something to do with setBorder, but I can't
find it.

Thx,
Oswald
Apr 21 '07 #1
0 4332

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matt Rapoport | last post by:
I'd like to programmatically remove a service or change its startup type to disabled. I know how to remove it from the command line but is there another way using the win32 extensions? I've...
7
by: Tim Rogers | last post by:
Hi folks, this is a resolution-detect script that I used on a site. As you can see it is designed to detect when the screen resolution falls below a certain level then load an alternative style...
4
by: porky008 | last post by:
I put in a next and previous button but it crashes when I run it. I also need it to loop around to the first or last if at the ends. Can some one help me with this? import java.awt.*; import...
7
by: garyusenet | last post by:
I'm using krypton toolkit which has allowed me to make a cool looking form. However, when I set my textbox to disabled it is 'greyed' out. The grey colour isn't in keeping with the office 2007...
0
by: ghostrider | last post by:
My program seems to slove for all the mortgages at once. And will not clear out the pane and accept another choice by the user. Can someone steer me in the right direction with this problem. My...
9
by: aleplgr | last post by:
Hi! I'm trying to let the end-user select the language of the menues I'm showing him. To do that I've got this Selector class that shows the end user a combo box, a label and a button. In the combo...
6
by: vijaykumarsharma | last post by:
Hi all I am having a problem with JButton. JButton b=new JButton("save"); how can i get the name of the JButton b. Please give the anser for me
5
by: milk242 | last post by:
Hi everyone I'm trying to change what shows up in the contentpane depending on what button you press. Say you press a button labeled "Customer", it would add textfields to the content pane. I...
12
by: yeshello54 | last post by:
So I want to set the background color of a Jbutton. I know that the normal way to do such a thing is down the following way: JButton button = new JButton("xxxx"); button.setBackground(Color.RED);...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.