-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPlotter.java
More file actions
51 lines (43 loc) · 1.62 KB
/
Plotter.java
File metadata and controls
51 lines (43 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright (c) 2007 by David J. Biesack, All Rights Reserved.
// Author: David J. Biesack David.Biesack@sas.com
// Created on Nov 4, 2007
package examples.plotter;
import javax.swing.*;
/**
* This is a Swing application which demonstrates the use of
* {@code javax.tools.Compiler} via the Facade class,
* {@code javaxtools.compiler.CharSequenceCompiler}. See {@link PlotterPanel} for more
* information.
*
* @author <a href="mailto:David.Biesack@sas.com">David J. Biesack</a>
*/
final public class Plotter extends JFrame {
private static final long serialVersionUID = 1L;
/**
* Display the plot GUI and allow user interaction.
*/
public static void main(final String[] args) {
try {
new Plotter().setVisible(true);
} catch (Throwable e) {
presentException(e);
}
}
static void presentException(Throwable t) {
String title = "Unable to run the " + Plotter.class.getName() + " application.";
String message = title
+ " \n"
+ "This may be due to a missing tools.jar or missing JFreeChart jars. \n"
+ "Please consult the docs/README file found with this application for further details.";
JOptionPane.showMessageDialog(null, message, title, JOptionPane.ERROR_MESSAGE);
}
/**
* Default constructor for the plotter application
*/
public Plotter() {
super("javaxtools.compiler demo");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().add(new PlotterPanel());
pack();
}
}