Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Beginning Java and the fly likes Picture Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Picture Question" Watch "Picture Question" New topic

Picture Question

Atrus Greyor
Ranch Hand

Joined: Mar 07, 2004
Posts: 110
What would the code be to put a picture off of your hard drive on to a frame? Any help would be appreciated
Jeffrey Hunter
Ranch Hand

Joined: Apr 16, 2004
Posts: 305
Look at the Java API, specifically:
  • Image
  • ImageIcon
  • JLabel (you can pass an Image into one of the JLabel constructors).

  • [ May 04, 2004: Message edited by: Jeffrey Hunter ]
    It is sorta covered in the JavaRanch Style Guide.
    subject: Picture Question
    Similar Threads
    WA #1.....word association
    Help needed for showing the Employee Pic with other properties
    PIcture Questions
    batik and ImageIO.write