Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Putting a LABEL on a big IMAGE

 
Zaafir Barahim
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please i want to know how to put a label in which text are written and this label must be embeded on an image. I have successfully embed an image on a big image using "g.drawImage(image, X_coordinate, Y_coordinate, this)". Please HELP ME OUT, i need it URGENTLY. Thanks in advance for any kind of HELP.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> Please i want to know how to put a label in which text are written and this
> label must be embeded on an image.

on the swing forum's main page there's a link to the Swing FAQ, which has an
example of a JPanel with a background image. Add your JLabel to that panel and
you should get what you want. Where you want the JLabel positioned will
determine which layoutManager you set for the JPanel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic