Setting a image as JButton's background

Hi all,

I want to set a image as a JButton's background with some text.

Do I need to do custom painting to set the image as the background in paintComponent(g) method? If so, can anyone provide me with a simple example to do it...

thanks

[263 byte] By [TrAnScEnD3nTa] at [2007-11-27 11:45:42]
# 1

> Do I need to do custom painting to set the image as the background in paintComponent(g) method?

Yes.

> If so, can anyone provide me with a simple example to do it...

There are plenty of examples already found in the forum if you do a search.

camickra at 2007-7-29 18:03:13 > top of Java-index,Desktop,Core GUI APIs...