3

I am using Java Netbeans GUI Builder for making GUI. I want to give the buttons a transparent (glossy) look.I am using

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

which also gives nice look to GUI but the buttons are still the same boring buttons.

So,how to give buttons a transparent look?

Michael Berry
  • 66,225
  • 20
  • 144
  • 202
Xara
  • 8,178
  • 15
  • 50
  • 79

4 Answers4

5

Try the following:

button.setOpaque(false);
button.setContentAreaFilled(false); //to make the content area transparent
button.setBorderPainted(false); //to make the borders transparent
Korhan Ozturk
  • 10,880
  • 6
  • 34
  • 47
3

You can have a look at setOpaque(true/false); Java it has information about setOpaque method of Component class.

Community
  • 1
  • 1
Rahul Borkar
  • 2,724
  • 2
  • 22
  • 38
3
I want to give the buttons a transparent (glossy) look.
Community
  • 1
  • 1
mKorbel
  • 109,107
  • 18
  • 130
  • 305
0
this.btnOptions.setFont(new Font("Forte", Font.PLAIN, 33)); 
this.btnOptions.setForeground(Color.YELLOW);
this.btnOptions.setOpaque(false);
this.btnOptions.setContentAreaFilled(false);
this.btnOptions.setBorderPainted(false);
this.btnOptions.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
Md Tamzid
  • 1
  • 1