I'm beginner to java and I'm doing a java project(maze solver) with a GUI. I need to build a grid of squares. I searched over the internet and unable to find any solutions, Someone told me that using java acm packages this can done easily. Please someone help me to do this.
Asked
Active
Viewed 2,967 times
1 Answers
1
You should use the [GridLayout] [1] and add controls in it.
[1] http://docs.oracle.com/javase/7/docs/api/java/awt/GridLayout.html

Vivin
- 1,327
- 2
- 9
- 28
-
I tried, the problem is the buttons are rectangle. I want to make them square. setSize() method do not seem to work. – Guest Jul 01 '14 at 17:10
-
Why not draw a rectangle and provide all the sides equal? – Vivin Jul 01 '14 at 17:16