Results 1 to 3 of 3
Thread: JButton.setBackground() Problem
- 02-24-2010, 10:29 PM #1Member
- Join Date
- Feb 2010
- Rep Power
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 :
Thanks to any help...
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.
- By cowboy in forum New To JavaReplies: 5Last Post: 12-19-2009, 10:17 PM
- By boisk in forum AWT / SwingReplies: 15Last Post: 03-15-2009, 03:27 PM
- By wassim in forum AWT / SwingReplies: 6Last Post: 02-18-2009, 11:29 PM
- By geoffreybarwise in forum New To JavaReplies: 4Last Post: 05-21-2008, 10:48 AM
- By Marcus in forum AWT / SwingReplies: 1Last Post: 07-05-2007, 05:56 AM