Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logos or Pics for JPanel

 
Rik Ny
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I place a pic or logo of my own on a JPanel??
 
Shiekh Naveed Akhter
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can use paint method in JPanel to paint a picture:
public void paint(Graphics g)
 
Jeff Smith
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a JLabel and set that label's icon to your pic/logo, then just add the label to your panel.
Jeff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic