Results 1 to 4 of 4
Thread: Gaming Project on Java
- 07-24-2010, 09:31 AM #1
Member
- Join Date
- Jul 2010
- Posts
- 3
- Rep Power
- 0
- 07-24-2010, 10:40 AM #2
Member
- Join Date
- Jul 2010
- Posts
- 43
- Rep Power
- 0
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.
-
Agree with Peter, you need to give much more information for your question to be answerable. Please have a look at: How to ask smart questions
- 07-26-2010, 07:44 PM #4
Member
- Join Date
- Jul 2010
- Posts
- 3
- Rep Power
- 0
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
-
Need help on a Java project Please!!
By Aimuthe in forum New To JavaReplies: 2Last Post: 03-09-2010, 07:33 AM -
Three new forums are created: Android, JavaFX and Java Gaming
By Java Tip in forum Java SoftwareReplies: 0Last Post: 02-16-2010, 10:07 AM -
Careers in Gaming
By satpal in forum Jobs OfferedReplies: 0Last Post: 01-18-2010, 11:59 AM -
how to get the project in java.....
By thirumurugan.sethu in forum New To JavaReplies: 2Last Post: 10-07-2008, 07:37 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks