Results 1 to 4 of 4
- 12-04-2011, 01:24 PM #1
Member
- Join Date
- Dec 2011
- Posts
- 13
- Rep Power
- 0
I stuck my project from any piece
i do card game in java2d .firs i created new class that class name of card is CARD.i added graphics2d function in CARD class.I added constructer .these parameter are (int CoordinateX,int CoordinateY) .then.i created main class.i added frame in mainclass.then i called CARD Class...
CARD card1=new CARD();
CARD card2=new CARD();
after the added them
my real question is .when i added frame.add(card1),frame.add(card2) in main class.after when i run.just i can see card2.
so if i can add frame.add(card2),frame.add(card1) in main class.just i can see card1.
Thank you:))my english is bad.sorry:((
- 12-04-2011, 01:58 PM #2
Re: I stuck my project from any piece
Lesson: Laying Out Components Within a Container (The Java™ Tutorials > Creating a GUI With JFC/Swing)
Note that JFrame uses a BorderLayout by default.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 12-04-2011, 02:02 PM #3
Member
- Join Date
- Dec 2011
- Posts
- 13
- Rep Power
- 0
Re: I stuck my project from any piece
thank you bro.can you an example for me.how can i do it .:)
- 12-05-2011, 08:06 PM #4
Re: I stuck my project from any piece
No, this is a forum -- not a code mill. And what's lacking in the examples provided in the tutorial I linked? You did go through that tutorial -- or are you waiting in the hope that someone here will spoonfeed you? Not likely to happen.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
Need help with a piece of code
By sneeak in forum New To JavaReplies: 13Last Post: 08-24-2011, 10:51 AM -
Working out chess piece location / piece name
By danborgir in forum New To JavaReplies: 5Last Post: 04-20-2011, 10:14 AM -
Can someone clarify this piece of code for me.
By DavidPynes in forum New To JavaReplies: 2Last Post: 04-17-2011, 10:22 AM -
problem getting a piece of data out of XML
By Sparky in forum New To JavaReplies: 8Last Post: 02-14-2011, 09:30 PM -
Decode this piece of Code
By mikeyl62 in forum New To JavaReplies: 2Last Post: 02-27-2010, 08:59 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks