Results 1 to 2 of 2

Thread: pictures...

  1. #1
    whosadork is offline Member
    Join Date
    Sep 2008
    Posts
    29
    Rep Power
    0

    Default pictures...

    how do I command java to import a picture??
    like take that picture and put it onto a JFrame...?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    You'll want to first display it on a JPanel: JavaRanch FAQ : Background Image On J Panel

    and then you can make that JPanel the JFrame's contentPane.

    If you haven't done so, you'll want to study the Sun Swing tutorials. There you will find information on how to do this and a host of other things with Swing.

Similar Threads

  1. Replies: 22
    Last Post: 07-25-2012, 09:51 PM
  2. Scale 2 or more pictures using a JSlider
    By Panchitopro in forum AWT / Swing
    Replies: 4
    Last Post: 05-20-2008, 04:44 PM
  3. Scale 2 or more pictures using a JSlider
    By Panchitopro in forum New To Java
    Replies: 0
    Last Post: 05-05-2008, 05:22 PM
  4. Help Loading Up Pictures
    By marco in forum Java Applets
    Replies: 3
    Last Post: 08-14-2007, 10:32 PM
  5. Help with pictures en Java
    By susan in forum AWT / Swing
    Replies: 1
    Last Post: 08-07-2007, 04:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •