|
1 | | -/* |
2 | | - * Open Source Physics software is free software as described near the bottom of this code file. |
3 | | - * |
4 | | - * For additional information and documentation on Open Source Physics please see: |
5 | | - * <http://www.opensourcephysics.org/> |
6 | | - */ |
7 | | - |
8 | | -package demo; |
9 | | -import javax.swing.JFrame; |
10 | | -import org.opensourcephysics.frames.PlotFrame; |
11 | | -//import org.opensourcephysics.tools.DiagnosticsForThreads; |
12 | | - |
13 | | -/** |
14 | | - * A simple program to test the OSP Library installation. |
15 | | - * |
16 | | - * @author anonymous |
17 | | - * @version 1.0 |
18 | | - */ |
19 | | -public class FirstPlotApp { |
20 | | - public static void main(String[] args) { |
21 | | - PlotFrame frame = new PlotFrame("position", "amplitude", "First Plot"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
22 | | - frame.setSize(400, 400); |
23 | | - for(double x = -10, dx = 0.1; x<10; x += dx) { |
24 | | - frame.append(0, x, Math.sin(x)); |
25 | | - } |
26 | | - //frame.setAutoscaleX(false); |
27 | | - //frame.setAutoscaleY(false); |
28 | | - frame.setVisible(true); |
29 | | - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
30 | | - //DiagnosticsForThreads.aboutThreads(); |
31 | | - } |
32 | | - |
33 | | -} |
34 | | - |
35 | | -/* |
36 | | - * Open Source Physics software is free software; you can redistribute |
37 | | - * it and/or modify it under the terms of the GNU General Public License (GPL) as |
38 | | - * published by the Free Software Foundation; either version 2 of the License, |
39 | | - * or(at your option) any later version. |
40 | | -
|
41 | | - * Code that uses any portion of the code in the org.opensourcephysics package |
42 | | - * or any subpackage (subdirectory) of this package must must also be be released |
43 | | - * under the GNU GPL license. |
44 | | - * |
45 | | - * This software is distributed in the hope that it will be useful, |
46 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
47 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
48 | | - * GNU General Public License for more details. |
49 | | - * |
50 | | - * You should have received a copy of the GNU General Public License |
51 | | - * along with this; if not, write to the Free Software |
52 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA |
53 | | - * or view the license online at http://www.gnu.org/copyleft/gpl.html |
54 | | - * |
55 | | - * Copyright (c) 2007 The Open Source Physics project |
56 | | - * http://www.opensourcephysics.org |
57 | | - */ |
| 1 | +/* |
| 2 | + * Open Source Physics software is free software as described near the bottom of this code file. |
| 3 | + * |
| 4 | + * For additional information and documentation on Open Source Physics please see: |
| 5 | + * <http://www.opensourcephysics.org/> |
| 6 | + */ |
| 7 | + |
| 8 | +package demo; |
| 9 | +import javax.swing.JFrame; |
| 10 | +import org.opensourcephysics.frames.PlotFrame; |
| 11 | +//import org.opensourcephysics.tools.DiagnosticsForThreads; |
| 12 | + |
| 13 | +/** |
| 14 | + * A simple program to test the OSP Library installation. |
| 15 | + * |
| 16 | + * @author anonymous |
| 17 | + * @version 1.0 |
| 18 | + */ |
| 19 | +public class FirstPlotApp { |
| 20 | + public static void main(String[] args) { |
| 21 | + PlotFrame frame = new PlotFrame("position", "amplitude", "First Plot"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| 22 | + frame.setSize(400, 400); |
| 23 | + for(double x = -10, dx = 0.1; x<10; x += dx) { |
| 24 | + frame.append(0, x, Math.sin(x)); |
| 25 | + } |
| 26 | + //frame.setAutoscaleX(false); |
| 27 | + //frame.setAutoscaleY(false); |
| 28 | + frame.setVisible(true); |
| 29 | + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
| 30 | + //DiagnosticsForThreads.aboutThreads(); |
| 31 | + } |
| 32 | + |
| 33 | +} |
| 34 | + |
| 35 | +/* |
| 36 | + * Open Source Physics software is free software; you can redistribute |
| 37 | + * it and/or modify it under the terms of the GNU General Public License (GPL) as |
| 38 | + * published by the Free Software Foundation; either version 2 of the License, |
| 39 | + * or(at your option) any later version. |
| 40 | +
|
| 41 | + * Code that uses any portion of the code in the org.opensourcephysics package |
| 42 | + * or any subpackage (subdirectory) of this package must must also be be released |
| 43 | + * under the GNU GPL license. |
| 44 | + * |
| 45 | + * This software is distributed in the hope that it will be useful, |
| 46 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 47 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 48 | + * GNU General Public License for more details. |
| 49 | + * |
| 50 | + * You should have received a copy of the GNU General Public License |
| 51 | + * along with this; if not, write to the Free Software |
| 52 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA |
| 53 | + * or view the license online at http://www.gnu.org/copyleft/gpl.html |
| 54 | + * |
| 55 | + * Copyright (c) 2017 The Open Source Physics project |
| 56 | + * http://www.opensourcephysics.org |
| 57 | + */ |
0 commit comments