in that case what coulf be the solution

Greg Munt wrote:
That's the AWT way of doing things. Overriding paint would likely cause problems if a PLAF were required later on.
----- Original Message -----
Sent: Tuesday, October 01, 2002 10:35 AM
Subject: Re: What is this JComponent?

for this you would have to create your custom button extending from JButton and then overriding its paint method

Xiao Wei wrote:
Hi Vikram,
 
Thank you very much for your quick response.
Yes, you are right we can have a button which has icon at top and text at bottom. But how can I implement that when I first click on it, the background color of the text is changed(only getting focus, not fire an event) and click again, then fire one event?
 
Thanks.
-----Original Message-----
From: Vikram Kumar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 11:02 AM
To: Xiao Wei
Cc: [EMAIL PROTECTED]
Subject: Re: What is this JComponent?

Yeah .. They are simple JButtons.. whose icon can be set for normal , mouseOver and mousePressed mode.


Regards

Vikram

Xiao Wei wrote:

Hi all,

I have seen many Swing applications that have such components which have icon at the top and text at the bottom. When you first click on them, background color of the text is changed (getting focus), and click on them again, fire one event listener.

Does anyone know this?

Thanks.

<<Xiao Wei.vcf>>



-- 
Regards

Vikram Kumar
http://www.employees.org/~vikram

Accept what you cannot change and change what you cannot accept.


-- 
Regards

Vikram Kumar
http://www.employees.org/~vikram

Accept what you cannot change and change what you cannot accept.

Reply via email to