Java - set opacity in JPanel

前端 未结 6 678
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-09 10:16

Let\'s say I want to make the opacity of a JPanel %20 viewable? I don\'t mean setOpaque (draw or not draw) or setVisible (show or hide)... I mean make it see-through JPanel.

6条回答
  •  伪装坚强ぢ
    2020-12-09 10:24

    AWTUtilities.setWindowOpacity(aWindow, aFloat);
    

    Where aWindow is the Swing component, and aFloat is the opacity.

提交回复
热议问题