Results 1 to 3 of 3
Thread: JButton.setBackground() Problem
- 02-24-2010, 09:29 PM #1
Member
- Join Date
- Feb 2010
- Posts
- 21
- Rep Power
- 0
JButton.setBackground() Problem
Hi All,
When i apply the setBackground() Method to a JButton to set its Background, i face i Problem :
Under Mac Os : The JButton DOSE NOT change its color,
when i take my code to my other computer under Windows : OK, the JButton change...
i am wondering ....
1) Why under my Mac OS i face this problem...
2) and Why i get two different results from a same code ??? Java is not Portable?? and independant of the OS?? or it is the swing that makes the problem???
My code is so simple :
MyJButton.setBackground(new Color(255,100,100));
Thanks to any help...
:confused:
-
The background color and drawing of the button is usually accomplished through the look and feel. Your directly manipulating it may be allowed by some of the look and feels but not by others. You may wish to change the color through the look and feel instead.
-
Please see what JavaRanch has to say about cross-posting: BeForthrightWhenCrossPostingToOtherSites
The same etiquette applies here, the Sun/Oracle site, and most other programming fora. Thank you for your cooperation.
Similar Threads
-
A problem with JScrollBar and the Jbutton
By cowboy in forum New To JavaReplies: 5Last Post: 12-19-2009, 09:17 PM -
Problem on adding JButton on JPanel NEED HELP
By boisk in forum AWT / SwingReplies: 15Last Post: 03-15-2009, 02:27 PM -
JButton Problem
By wassim in forum AWT / SwingReplies: 6Last Post: 02-18-2009, 10:29 PM -
Help with JButton
By geoffreybarwise in forum New To JavaReplies: 4Last Post: 05-21-2008, 10:48 AM -
Problem with JButton
By Marcus in forum AWT / SwingReplies: 1Last Post: 07-05-2007, 05:56 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks