*
The moose likes Game Development and the fly likes Panel grid Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Game Development
Bookmark "Panel grid" Watch "Panel grid" New topic
Author

Panel grid

S. Shree
Greenhorn

Joined: Jun 25, 2008
Posts: 16
Hi,

I am looking to create a panel grid like this :

[] [] [] [] []
[] [] [] [] []
[] [] [] [] []

I have taken an array for that purpose:



I also took a for loop to display them.



But when I run my app the panels did not load as intended, I tried changing the layout manager but didn't work. I am a beginner at java any help would really be nice. By the b is a reference variable for a object of the type JFrame.

Thanks in advance
[ June 25, 2008: Message edited by: rash exponent ]
S. Shree
Greenhorn

Joined: Jun 25, 2008
Posts: 16
I found out the solution myself. For those who are having same problem - I used the GridLayout for the panel that holds the array of panels.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"rash exponent",
Please check your private messages.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Panel grid