String result;
dialog = new NewMazeDialog(Main.getPrimaryFrameInstance());
if ( (result = dialog.showDialog()) == null)
return;
MazeInfoModel mim = Main.getPrimaryFrameInstance().getMazeInfoModel();
if (result.equals(NewMazeDialog.MAZ))
{
MazeInfo newMi = mim.createNew("New Maze " + mLastNew, false);
if (newMi == null)
{
JOptionPane.showMessageDialog(MazeEditorPage.this,
"Unable to create new maze",
"Maze Creation Error",
JOptionPane.OK_OPTION);
return;
}
mLastNew++;
}
else if (result.equals(NewMazeDialog.MZ2))
{
MazeInfo newMi = mim.createNew(dialog.getText(), true);
if (newMi == null)
{
JOptionPane.showMessageDialog(MazeEditorPage.this,
"Unable to create new maze",
"Maze Creation Error",