Why does my JButton look differently of different computers?
Posted
by Roman
on Stack Overflow
See other posts from Stack Overflow
or by Roman
Published on 2010-04-27T12:57:16Z
Indexed on
2010/04/27
13:03 UTC
Read the original article
Hit count: 340
I use JButtons in my application. They need to have different colors. First I used that btn.setBackground(col);
. It works on my computer and on another computer my button just gray (not red, as it's supposed to be).
Trying to solve this problem I decided to use images. I do it in the following way: tmp = new JButton(newIcon);
Again, it works fine on my computer and on another computer I see just gray buttons.
Does anybody have any ideas what can be the reason of the problem and how it can be solved? I heard it can be related to "look-and-feel of the native system". But I do not know what it means and what should I do if it is the case? Can anybody pleas, help me with that?
© Stack Overflow or respective owner