Results 1 to 2 of 2
Thread: Making a GridLayout?
- 03-19-2012, 10:27 PM #1Member
- Join Date
- Mar 2012
- Rep Power
Making a GridLayout?
I am new in this site and need some help with making a board using the GridLayout. I have a project where i have to make board games. And all these games have one common things, i need to make a board. So instead of making board for each, i want to have a super class which has a drawBoard method. So how am i going to do that? Below is my rough code but its not right.
public void drawBoard (int numOfRow, int numOfColoumn)
GridLayout grid = new GridLayout (numOfRow, numOfColoumn);
This is how i thought it would work but it doesnt. Any help? and i want a boarder outline to my grid/board aswell.
Re: Making a GridLayout?
You state that it doesn't work, but perhaps need to tell us more such as how does the code not work? What behaviors are you trying to achieve but not seeing? Can you show an image of what you're attempting (if that would be helpful)?
- By eiramae in forum Java AppletsReplies: 3Last Post: 02-19-2011, 06:11 AM
- By amro in forum New To JavaReplies: 8Last Post: 10-31-2010, 05:45 PM
- By Java Tip in forum Java TipReplies: 0Last Post: 01-08-2008, 10:04 AM
- By tojas in forum AWT / SwingReplies: 3Last Post: 11-12-2007, 11:16 PM
- By Marty in forum AWT / SwingReplies: 2Last Post: 05-31-2007, 11:48 AM