Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to overlap swing components

Status
Not open for further replies.

clax99

Programmer
Oct 29, 2001
23
US
Hi, Im making a deck of playing cards and I need to display a spread of 13 cards(for spades). the card objects extend canvas and draw the appropriate graphics on themselves. I have a Deck class that extends JPanel and will display the spread of Card objects; trouble is I dont know how to force the overlap of the these card components to display a standard spread of cards. The normal layout managers end up just displaying 13 full cards, which is obviously not what one wants in a spread. How do I overlap components arbitrarily? Any help is much appreciated.

-Clarence
 
Try an AbsoluteLayout. That's my best advice. A GridBag might also do the trick if you set the cell width to 2 or something like that. Good Luck. MYenigmaSELF:-9
myenigmaself@yahoo.com
"If debugging is the process of removing bugs, then programming must be the process of putting them in." --Dykstra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top