Two Laptop Bag*
The moose likes Swing / AWT / SWT and the fly likes Help w/ custom JButton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Help w/ custom JButton" Watch "Help w/ custom JButton" New topic
Author

Help w/ custom JButton

Tom Collins
Greenhorn

Joined: Mar 13, 2006
Posts: 10
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:
setContentAreaFilled(false);
but the border is NOT set to null.

I would appriciate any suggestions that you may have.

Thanks,
Tom Collins


Me fail english?! That's unpossible!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help w/ custom JButton
 
Similar Threads
Help adding JButton to a JPanel from another method!
JToggleButton background color
BoxLayout - JButton size
JButtons icon
JButton with bad Labels