board panel gets dimensions directly from KnightsTourBoard object
git-svn-id: svn://anubis/gvsu@87 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
f2418fd7b6
commit
33310aef16
@ -79,13 +79,15 @@ public class KnightsTour extends JFrame
|
||||
}}, BorderLayout.NORTH);
|
||||
}});
|
||||
|
||||
createBoardPanel(5, 5);
|
||||
createBoardPanel();
|
||||
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
private void createBoardPanel(int width, int height)
|
||||
private void createBoardPanel()
|
||||
{
|
||||
int width = m_ktBoard.getWidth();
|
||||
int height = m_ktBoard.getHeight();
|
||||
if (m_boardPanel != null)
|
||||
m_mainPanel.remove(m_boardPanel);
|
||||
m_boardPanel = new JPanel(new GridLayout(width, height));
|
||||
|
Loading…
x
Reference in New Issue
Block a user