This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help w/ custom JButton  RSS feed

Tom Collins
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am still somewhat new to Java and I am trying to make some custom shaped buttons. I have about 30 various "invisible" buttons I am trying to make. I have figured out how to resize and make invisible a normal JButton, but now I need to make some odd shaped buttons.

I would perfer to make the shape (basically the border) in photoshop and then turn that picture into a clickable button. I think that the shapes might be a little to difficult to draw in Java. One thing I would like to duplicate from my invisible JButtons is the ablility to show a doubled border when the mouse rolls over the button.

The code I'm using to make the Jbuttons invisible is:
but the border is NOT set to null.

I would appriciate any suggestions that you may have.

Tom Collins
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!