[java] buttons..........

Started by
5 comments, last by Themonkster 21 years, 2 months ago
Hi Guys, I am looking for some reference on creating buttons. I want to make my buttons look good not just the aweful grey buttons that are standard on a win system. Do I just add a action listener to a image so when the mouse is over I swap the image(like roll overs on websites)? or is there another way? or is there something I have missed? changing the colour of the buttons would be a start. any ideas. Cheers
Advertisement
You can use images in your swing-buttons.

For more information, read
http://java.sun.com/docs/books/tutorial/uiswing/components/components.html
I do believe you can actually create a new button class and inherit from the standard Jbutton classes. That way, you just alter the paint method and maintain all the functionality.
Or, if you need to alter the appearance of your entire user interface, consider using a different Swing "Look and Feel". Check out the Skin L&F, it offers the ability to swap out a variety of button looks.

Find it at http://www.l2fprod.com/

[edit: you'd think I've learned to edit for spelling, but...]

[edited by - BlackArrow on February 2, 2003 9:31:32 PM]
thanks guys
I''ve got a tutorial on exactly this kind of thing over at www.javage.net, this takes the approach of extending from a standard JButton. Hope this is what you are looking for!

Jiim Jonez
cheers Jim spot on.

This topic is closed to new replies.

Advertisement