• Advertisement

Archived

This topic is now archived and is closed to further replies.

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

This topic is 5498 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
You can use images in your swing-buttons.

For more information, read
http://java.sun.com/docs/books/tutorial/uiswing/components/components.html

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement