how do I change the opacity of a JButton code example
Example 1: how do I change the opacity of a JButton
private float opacity;
//......
public setOpacity(float opacity) {
this.opacity = opacity;
}
public void getOpacity(){
return this.opacity
}
Example 2: how do I change the opacity of a JButton
MyJButton myJbtn = new MyJButton();
myJbtn.setOpacity(0.5);
myJbtn.repaint();