FractalPanel -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //******************************************************************** // FractalPanel.java Author: Lewis/Loftus // // Solution to Programming Project 11.10 // // Creates the panel used to display the recursive fractals. //******************************************************************** / import java.awt.*; import javax.swing.JPanel; i public class FractalPanel extends JPanel { private final int PANEL_WIDTH = 400; private final int PANEL_HEIGHT = 400; private final int TOPX = 200, TOPY = 20; private final int LEFTX = 60, LEFTY = 300; private final int RIGHTX = 340, RIGHTY = 300; private final int BORDER = 20; private final int NUM_FRACTALS = 2; private final int DEFAULT_DESIGN = RecursiveFractal.KOCH; private final int DEFAULT_ORDER = 9; private int current; // current order private int design; private Color foreground; private Color background; RecursiveFractal fractals; //----------------------------------------------------------------- // Sets the initial fractal order to the value specified. //----------------------------------------------------------------- public FractalPanel(int currentOrder) { current = currentOrder; foreground = Color.green; background = Color.black; design = DEFAULT_DESIGN; fractals = new RecursiveFractal[NUM_FRACTALS];...
View Full Document

Page1 / 3

FractalPanel -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online