Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Change JButton look  RSS feed

 
Mathew Mintalm
Ranch Hand
Posts: 103
Eclipse IDE Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I would like to ask How can I change JButton look, i know how I can set icon (but than i have only my img inside button) And I would like to create with only my image.

Someone can help me?
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mathew, please read your private messages.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> And I would like to create with only my image.

see if this gets you close

 
Mathew Mintalm
Ranch Hand
Posts: 103
Eclipse IDE Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You, but where should i put name of my img?

And I have to put my img in res folder, right?
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's your problem, customizing a JButton or loading an image? Please don't mix disparate questions in the same thread.

As for displaying "only the image" I would suggest a JButton with an Icon and no text, andinstead of subclassing to override paintComponent.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!