Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2010
    Posts
    3
    Rep Power
    0

    Smile Gaming Project on Java

    hi buddies...

    im having the problem of adding multiple images to JFrame..
    could any one help me...

  2. #2
    peterhabe is offline Member
    Join Date
    Jul 2010
    Posts
    43
    Rep Power
    0

    Default

    Could do with being a little more specific about your problem. Posting some code may hep as well so people know what you already have.

    If you use a layout manager it should work.

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

  4. #4
    Join Date
    Jul 2010
    Posts
    3
    Rep Power
    0

    Default

    Dear buddies..

    here is my code... to display two images on one another just like overlapping....it works & no problem at all...is there any other smart way to do this... actually im doing car race project using java in GUI environmen...

    import javax.swing.*;
    import java.awt.event.*;

    class Main extends JFrame
    {
    JLabel name,pass;
    ImageIcon i1=new ImageIcon("parthi.jpg");
    ImageIcon i2=new ImageIcon("addemp.jpg");
    Main()
    {
    super("Swing Demo");
    showComp();
    setBounds(450,200,300,250);
    setLayout(null);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setVisible(true);
    }
    public void showComp()
    {

    pass=new JLabel(i2);
    pass.setBounds(150,180,100,25);
    add(pass);
    name=new JLabel(i1);
    name.setBounds(50,50,300,250);
    add(name);



    }

    public static void main(String arg[])
    {
    new Main();
    }
    }

Similar Threads

  1. Need help on a Java project Please!!
    By Aimuthe in forum New To Java
    Replies: 2
    Last Post: 03-09-2010, 08:33 AM
  2. Replies: 0
    Last Post: 02-16-2010, 11:07 AM
  3. Careers in Gaming
    By satpal in forum Jobs Offered
    Replies: 0
    Last Post: 01-18-2010, 12:59 PM
  4. how to get the project in java.....
    By thirumurugan.sethu in forum New To Java
    Replies: 2
    Last Post: 10-07-2008, 08:37 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
  •