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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gird drawing on JPanel.

Status
Not open for further replies.

HighlandJinx

Programmer
May 20, 2002
34
GB
Hi guy's i'm at a bit of a loss here, I have to draw a grid onto a JPanel preferably using the Graphics2D class. I tried just line drawing a grid but i have to be able to access each square in the grid and "Colour" them black as needs.

I looked up the API couldn't find a grid class, i even tried laying down JPanels onto the main panel in a gridlayout but kinda threw a wobbly at me after 40 panels. I'm using Sun ONE Forte Community Edition software to.

Thanks for any help.
J
 
I think you're on the right track using the GridLayout. I have a layout with 11 rows of 6 columns (66 panels) with no problem.

Why don't you post your wobbly and maybe we can help with that.

"When you have eliminated the impossible, whatever remains, however
improbable, must be the truth." ~ Arthur Conan Doyle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top