/** * Makes a line drawing of the maze * * @param arr array with an integer representation of the maze. */ public void drawMaze(Maze2D mz, boolean b) { imagePanel.makeLineDrawing(mz, b); imagePanel.getPreferredSize(); setMinimumSize(imagePanel.getPreferredSize()); imagePanel.repaint(); pack(); }
/** * Displays the string representation of the maze. * * @param mz String representing the maze. */ public void displayMaze(String mz) { SimpleAttributeSet attr = new SimpleAttributeSet(); StyleConstants.setLineSpacing(attr, -0.3f); mazeOutLabel.setParagraphAttributes(attr, false); mazeOutLabel.setText(mz); imagePanel.add(mazeOutLabel); pack(); }
public void saveImage(File f) { // SaveImage driver.saveImage(imagePanel.getImage(), f); }