I am programming in JAVA and my OS is MAC. I am trying to setForeground or even setBackground of my JButtons, but no progress. I have added:
button.setOpaque(true); 
button.setBorderPainted(false);
But still, no changes! How can I change the colour of my JButtons?
Here is my Code:
    public class New_button extends JButton{
    String up = new String("<html><font color=BLACK>^<size=50></font></html>");
    String down = new String("<html><font color=BLACK>v<size=50></font></html>");
    double value;
    int foldChange;
    public New_button(double val, int foldChan) {
        value = val;
        foldChange = foldChan;
        this.setSize(30, 30);
        this.setFont(this.getFont().deriveFont(50.0f));
        this.setBorder(null);
    }
    public void changeColor(double value){
         try {
                UIManager.setLookAndFeel( UIManager.getCrossPlatformLookAndFeelClassName() );
             } catch (Exception e) {
                        e.printStackTrace();
             }
        if(value > 0.05){
            this.setForeground(Color.YELLOW);
            this.setOpaque(true);
            this.setBorderPainted(false);
        }
        else{
            this.setForeground(Color.RED);
            this.setOpaque(true);
            this.setBorderPainted(false);
        }
    }
    public void changeLable(int foldChange){
        if(foldChange == 1)
            this.setText(up);
        else
            this.setText(down);
    }    
}
Thanks