Results 1 to 4 of 4
Like Tree2Likes
  • 1 Post By Fubarable
  • 1 Post By Dissonance

Thread: Placing several images on panel

  1. #1
    Dissonance is offline Programming Again
    Join Date
    May 2012
    Location
    Eugene, OR
    Posts
    55
    Rep Power
    0

    Default Placing several images on panel

    My programming experience only includes the work I've done with Java over the last few months, and this forum has been very helpful--Thanks!. I can now figure out most things on my own. I'm doing something new to me, and I would like some advice about how to begin, and then I think I can get my project going.

    I would like to place several images with transparent backgrounds onto a panel inside an applet. I would like to be able to set overlapping locations and resize the images. What kind of panel should I use? Is there a library that would be useful?

    Thanks,
    D

  2. #2
    PhQ's Avatar
    PhQ
    PhQ is offline Senior Member
    Join Date
    Mar 2010
    Location
    Lithuania
    Posts
    358
    Rep Power
    5

    Default Re: Placing several images on panel

    You can go with something a little bit more advanced and use Canvas.

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

    Default Re: Placing several images on panel

    I would avoid Canvas and AWT components but instead use Swing and a component such as a JLayeredPane. You could then layer other components on top of this such as JLabels that hold ImageIcons.
    DarrylBurke likes this.

  4. #4
    Dissonance is offline Programming Again
    Join Date
    May 2012
    Location
    Eugene, OR
    Posts
    55
    Rep Power
    0

    Default Re: Placing several images on panel

    I put BufferedImages in JLabels, borrowed some code to scale the images, and then put them on a JPanel. It's working for what I need it to do. I'll give the JLayeredPane a try too. Thanks for the suggestions!
    Fubarable likes this.

Similar Threads

  1. Placing a game in a Jframe, gui or whatever
    By AndroidAppNewbie in forum AWT / Swing
    Replies: 3
    Last Post: 02-12-2011, 07:21 PM
  2. placing the components
    By rajeevhegde in forum AWT / Swing
    Replies: 1
    Last Post: 05-17-2010, 03:12 PM
  3. placing jar file
    By ras_pari in forum New To Java
    Replies: 1
    Last Post: 12-01-2009, 09:32 AM
  4. Placing images in frame's setTitle
    By gammaman in forum New To Java
    Replies: 1
    Last Post: 07-24-2009, 01:50 PM
  5. Help placing images in JFrame
    By gammaman in forum New To Java
    Replies: 8
    Last Post: 07-24-2009, 02:19 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
  •