FractalPanel

# FractalPanel - FractalPanel.java Author Lewis/Loftus...

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

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

View Full Document
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

## This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

### Page1 / 3

FractalPanel - FractalPanel.java Author Lewis/Loftus...

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

View Full Document
Ask a homework question - tutors are online