Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
|
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 1st, 2005, 06:24 AM
Registered User
 
Join Date: Jan 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default JButtons Problem Help needed

Hi,
    How to add Photoshop buttons in place of JButtons.....but plzz don't suggest that....add Photoshop buttons to JPanel and capture mouse clicks...and verify wether it is in the range of the image or not..but i need is there any methods...so that i can convert my photoshop button as one of the components like Button, list, or label..so that once i click on it it shouls generate event?












 
Old January 3rd, 2005, 09:19 AM
Registered User
 
Join Date: Jan 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

u can override JComponent method paint(). through this u can solve u'r problem.

thamizh

 
Old May 15th, 2005, 10:00 AM
Registered User
 
Join Date: May 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It really has a lot to do with the JButtonUI within the pluggable look and feel architecture.
Read a little bit on the JButtonUI ortherwise you will have to wait until i get home to find some specific code on that and get back to you later otherwise try this.
save your Photoshop buttons as JPEG or GIF images and set them as images on the JButton insatnce like...
ImageIcon icon = new ImageIcon("c:/location to image");
JButton button = new JButton(icon)
And then set the button border property to empty.
like this..
button.setBorder(BorderFactory.createEmptyBorder() );
It might look good.







Similar Threads
Thread Thread Starter Forum Replies Last Post
A serious string problem. Urgent solution needed. asfak XSLT 2 November 28th, 2007 06:08 AM
Dialog Problem -Urgent Help Needed jerusalem Visual C++ 0 January 6th, 2007 08:04 AM
Argent Help Needed Shaped Recordset Problem shery Access VBA 3 July 10th, 2004 02:14 AM
Grid of JButtons? LordOfGood JSP Basics 0 February 24th, 2004 11:15 AM
SQL Select problem (subquery needed??) deian SQL Language 7 February 3rd, 2004 02:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.