Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to draw a board using squares?

807601Apr 29 2008 — edited May 3 2008
hello,
I'm trying to make a game it is my first game called "Gomoku", I need to know how to start to develop simple board games in java with using another class which called Square. it represents one square of the board. contains simple attributes x,y for the position and occupied variable to check if the sequare is occupied by the circle or not. And I should draw the board using JPanel.

is there any simple example for that? I can't figure out how to draw a grid of 10x10 2d array by using Square class and paintComponent in JPanel. I'm a beginner in learning about graphics in java but I want to start understanding games and implement them.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 31 2008
Added on Apr 29 2008
7 comments
1,022 views