001package bradleyross.sound;
002// import java.awt.*;
003// import java.awt.event.*;
004
005// import javax.swing.*;
006import javax.swing.JApplet;
007import javax.swing.JFrame;
008import javax.swing.JPanel;
009import javax.swing.SwingUtilities;
010// import javax.swing.event.*;
011// import javax.swing.border.*;
012
013// import java.text.DecimalFormat;
014// import java.io.IOException;
015
016
017//import javax.sound.sampled.*;
018// import javax.sound.sampled.AudioSystem;
019// import javax.sound.sampled.AudioFormat;
020// import javax.sound.sampled.AudioInputStream;
021// import javax.sound.sampled.Clip;
022// import javax.sound.sampled.FloatControl;
023// import javax.sound.sampled.LineUnavailableException;
024// import javax.sound.sampled.UnsupportedAudioFileException;
025
026// import java.io.ByteArrayInputStream;
027@SuppressWarnings("serial")
028public class ToneGenerator extends JApplet {
029        protected ControlPanel cp = null;
030
031
032        /**
033         * This is the control panel for the tone generator (incomplete).
034         * @author Bradley Ross
035         *
036         */
037
038        protected class ControlPanel extends JPanel {
039                
040        }
041
042        protected class FrequencySelector extends JPanel {
043                
044        }
045        /**
046         * Executed when class is called as an Java applet.
047         */
048        public void init() {
049                cp = new ControlPanel();
050                getContentPane().add(cp);
051                validate();
052        }
053        /**
054         * Executed when class is called as a Java application.
055         * @param args not used in this case
056         */
057        public static void main(String[] args) {
058                SwingUtilities.invokeLater(new Runnable() {
059                        public void run() {
060                                ToneGenerator instance = new ToneGenerator();
061                                JFrame f = new JFrame("Tone Generator");
062                                f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
063                                ControlPanel controlPanel = instance.new ControlPanel();
064                                f.setContentPane(controlPanel);
065                                f.pack();
066                                f.setMinimumSize( f.getSize() );
067                                f.setLocationByPlatform(true);
068                                f.setVisible(true);
069                        }
070                });
071        }
072}