aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes how to tile image on jlabel? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to tile image on jlabel?" Watch "how to tile image on jlabel?" New topic
Author

how to tile image on jlabel?

dragon ji
Ranch Hand

Joined: Oct 31, 2002
Posts: 110
Hi, guys,

I want to make a label using 3 images,two for top and tail,one for middle.and I want to tile the middle image.

How can I get it?

thanx a lot

Best Regards

Dragon


scjp 1.4<br />challenge haven't limit!
Tommy Greenberg
Greenhorn

Joined: Jul 30, 2004
Posts: 15
Make a class that extends a JLabel and overwrite the paint method. I would use photoshop or some other graphic editor to make the image you require and would just use that. Or make a JPanel and use the GridBagLayout to place each of them as separate labels in the arrangement you want.
dragon ji
Ranch Hand

Joined: Oct 31, 2002
Posts: 110
thanx,Tommy Greenberg
I will try it.
 
Don't get me started about those stupid light bulbs.
 
subject: how to tile image on jlabel?