/Users/lyon/j4p/src/bookExamples/ch26Graphics/PlotFrame.java
|
1 /**
2 * Created by IntelliJ IDEA.
3 * User: dlyon
4 * Date: Feb 2, 2004
5 * Time: 4:07:49 PM
6 * To change this template use Options | File Templates.
7 */
8 package bookExamples.ch26Graphics;
9
10 import javax.swing.*;
11 import java.awt.*;
12
13 public class PlotFrame extends JFrame {
14 Container c = getContentPane();
15 //CircleFcn
16 PlotPoint2D pp2d = new PlotPoint2D(new SineFcn());
17 PlotPoint2D scf = new PlotPoint2D(new SineCircleFcn(200,200,10));
18
19
20 PlotPoint2D ppc = new PlotPoint2D(new CircleFcn(200,200,20));
21 PlotFrame() {
22 setSize(400, 400);
23 setVisible(true);
24 }
25
26 public static void main(String args[]) {
27 PlotFrame pf = new PlotFrame();
28 }
29
30 public void paint(Graphics g) {
31 pp2d.paint(g);
32 ppc.paint(g);
33 scf.paint(g);
34 }
35 }
36