-2

What is the best way to implement a configurable dimensional matrix to represent a 2d board game with cells using Java and Swing?

Grid Layout? Tables?

Rohit Jain
  • 209,639
  • 45
  • 409
  • 525
alex
  • 121
  • 3
  • 9

1 Answers1

2

The model of the board should be separate from its view so you can change your mind later if you find that one or the other doesn't work well.

Edwin Buck
  • 69,361
  • 7
  • 100
  • 138
  • 1
    Well, yes, but .. is this really more than a comment as it is? –  Nov 30 '12 at 23:55
  • 1
    It is a short answer, perhaps even a comment, but it does point the person into looking at models and views, when before they were only concerned with JComponents. To actually choose which JComponent serves their needs or to introduce MVC _yet again_ really doesn't serve SO's ideas of good answers either. – Edwin Buck Nov 30 '12 at 23:57