Creating custom JButton from images containing transparent pixels

前端 未结 6 567
悲哀的现实
悲哀的现实 2020-12-02 00:46

Read edit 2 for what I\'m actually missing to make it work

I\'m currently trying to create some custom JButtons using images created in photoshop that have an

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 00:52

    paintComponent() instead of paint() depends if you paint() inside XxxButtonUI or just override paintComponent(), but there exists the option JButton#setIcon.

提交回复
热议问题