2012-04-05 11 views
3

私はGUIを作るためにJava Netbeans GUI Builderを使用しています。私は透明(光沢)look.IもGUIへの素敵な外観を与えるJbuttons透過的な外観が必要

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 

を使用していますボタンを与えたいと思うが、ボタンはまだ同じ退屈なボタンです。

ボタンを透明な外観にするにはどうすればいいですか?

答えて

5

次のことを試してみてください。

button.setOpaque(false); 
button.setContentAreaFilled(false); //to make the content area transparent 
button.setBorderPainted(false); //to make the borders transparent 
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)); 
関連する問題