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
  • 70,193
  • 21
  • 157
  • 216
Xara
  • 8,748
  • 16
  • 52
  • 82

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
  • 11,148
  • 6
  • 36
  • 49
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,742
  • 3
  • 24
  • 38
3
I want to give the buttons a transparent (glossy) look.
Community
  • 1
  • 1
mKorbel
  • 109,525
  • 20
  • 134
  • 319
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