FractalApplet -...

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: //******************************************************************** // Author: Lewis/Loftus // // Solution to Programming Project 11.10 // // Demonstrates the use of recursion in graphics. // Allows a user to choose a fractal design, change the order of the // fractal and choose the background and foreground colors. //******************************************************************** import java.awt.*; import java.awt.event.*; import javax.swing.*; public class FractalApplet extends JApplet { private JButton increase, decrease, foreground, background; private JLabel titleLabel, orderLabel; private FractalPanel drawing; private JMenuItem koch, c; private JPanel appletPanel; //----------------------------------------------------------------- // Sets up the components for the applet. //----------------------------------------------------------------- public void init() { drawing = new FractalPanel (1); setJMenuBar(createMenuBar()); appletPanel = new JPanel(); appletPanel.add (createTools(), BorderLayout.NORTH); appletPanel.add (drawing, BorderLayout.CENTER); appletPanel.add (createColorButtons(), BorderLayout.SOUTH); getContentPane().add (appletPanel); } //----------------------------------------------------------------- // Creates the buttons used to change colors....
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 / 4

FractalApplet -...

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