0

Hi everyone, I'm developing a new program. ;)

My "dilema" is as follows: :S

Let's say that I have a Java component, a calendar, shown in the GUI and I want to cover it with and invisible label or something so it can't be modified by the user. I don't want to use object.setEditable(false) because it changes the background color of the domponent and object.setBackground(Color.someColor) is not working... :( maybe because of a bug.. I don't know.

I'm looking forward to your responses.
All ideas are welcome! :)
Thanks in advance.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by joelRam90
0

JTextComponent class has a method: setDisabledTextColor(Color). it will work for subclasses JTextField, JTextArea...,etc ...

So, you can use this method with the components inherited from JTextComponent in your Calendar or whatever.

0

JTextComponent class has a method: setDisabledTextColor(Color). it will work for subclasses JTextField, JTextArea...,etc ...

So, you can use this method with the components inherited from JTextComponent in your Calendar or whatever.

Mmmm, your idea is interesting. At first I didn't get it. Let me try it and let's see what it happens. But what I want is to change the background without the method setBackgroundColor or blocking it with and invisible label.
Thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.