Results 1 to 4 of 4
  1. #1
    tenis_09 is offline Member
    Join Date
    May 2010
    Posts
    4
    Rep Power
    0

    Default 2 Images in One Frame

    I want to make an Edge Detection program with the layout showed in the picture below.


    The Edge Detected image will have to be able to be repainted when the run algorithm button is pressed. How do I display 2 images at once? When I try making and imageframe, or using paint(Graphics g), only the image is displayed and the buttons do not appear.

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

    Default

    What is an image frame? Please tell the details.

    Does it have anything to do with your mixing AWT and Swing code as you do here: Java Programming - Why does my grayscale image appear black?

    By the way, you never responded to that post.

    To display more than one image, often we create ImageIcons and place them in JLabels, and format the structure of the GUI using layout managers as is well described in the Sun Swing tutorials. To change images, simply create a new ImageIcon and swap the icons in the displayed JLabel.
    Last edited by Fubarable; 07-07-2010 at 06:09 PM.

  3. #3
    tenis_09 is offline Member
    Join Date
    May 2010
    Posts
    4
    Rep Power
    0

    Default

    Oh, never mind about the ImageFrame.
    I got 2 images to display at once using ImageIcons~~

    Thanks so much for your help!!!

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

Similar Threads

  1. No frame?
    By Lars1111 in forum Java Applets
    Replies: 3
    Last Post: 04-16-2010, 03:47 AM
  2. Replies: 7
    Last Post: 11-02-2009, 07:31 PM
  3. Adding multiple images to frame
    By 435.mahesh in forum AWT / Swing
    Replies: 1
    Last Post: 04-24-2009, 09:31 PM
  4. Images in AWT frame
    By Urgle in forum New To Java
    Replies: 4
    Last Post: 12-02-2008, 07:37 AM
  5. Frame to other Frame
    By Aswq in forum New To Java
    Replies: 2
    Last Post: 07-19-2008, 05:27 PM

Posting Permissions

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