//Schrodinger wave equation simulation
Source code files are:
Schrodinger.java
SwingWorker.java

ThreadsSchrodinger.java


package schrodingerappletapplication;

import java.awt.Container;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import javax.swing.JApplet;
import javax.swing.JFrame;
import javax.swing.UIManager;

public class ThreadsSchrodinger extends JApplet implements Runnable {

    /**
     * Comment for serialVersionUID
     */
    private static final long serialVersionUID = 1L;

    /**
     * This is strictly boilerplate: set the look and feel, configure the
     * frame, pack(), show().
     */
    public static void main(String[] args) {
        String laf = UIManager.getCrossPlatformLookAndFeelClassName();
        try {
            UIManager.setLookAndFeel(laf);
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
        JFrame f = new JFrame("Scrodinger wave-equation simulation for a particle confined to a region 0 to L.");
        WindowListener l = new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
        };
        f.addWindowListener(l); 

        Container contentPane = f.getContentPane();
        final Schrodinger s = new Schrodinger();
        contentPane.add(s);
        f.setSize(1030,600);
        s.init();
        s.start();
        f.setVisible(true);
        /*SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                s.getStartButton().requestFocus();  //XXX: can't do this until now
            }
        });*/
     }
    
    public ThreadsSchrodinger() {
    }
    
public void init()
{
   
    
}
    
    /* (non-Javadoc)
     * @see java.lang.Runnable#run()
     */
    public void run()
    {
        JFrame f = new JFrame("Scrodinger wave-equation simulation for a particle confined to a region 0 to L.");
        Container contentPane = f.getContentPane();
        final Schrodinger s = new Schrodinger();
        contentPane.add(s);
        f.setSize(1030,600);
        s.init();
        s.start();
        f.setVisible(true);
        
    }
}

//