Results 1 to 2 of 2
  1. #1
    umzz is offline Member
    Join Date
    Mar 2012
    Rep Power

    Default Making a GridLayout?

    Hello there,

    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.

    Many Thanks

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

    Default 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)?

Similar Threads

  1. help! Gridlayout
    By eiramae in forum Java Applets
    Replies: 3
    Last Post: 02-19-2011, 05:11 AM
  2. how to control the GridLayout
    By amro in forum New To Java
    Replies: 8
    Last Post: 10-31-2010, 04:45 PM
  3. SWT GridLayout
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-08-2008, 09:04 AM
  4. GridLayout with animation?
    By tojas in forum AWT / Swing
    Replies: 3
    Last Post: 11-12-2007, 10:16 PM
  5. Gridlayout
    By Marty in forum AWT / Swing
    Replies: 2
    Last Post: 05-31-2007, 11:48 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts