package JoglTestApp;

import java.awt.*;
import java.awt.event.*;

public class JoglTestApp extends Frame implements WindowListener {
    
    JoglPanel _panel;

    public JoglTestApp() {
        
        setSize(700, 500);
        setTitle("JoglTestApp");
        setLayout(new BorderLayout());
        
        _panel = new JoglPanel();
        add(_panel, BorderLayout.CENTER);

        JoglObj obj = new JoglObj(_panel);
        _panel.setJoglObj(obj);
        _panel.add(obj.getCanvas());
        
        addWindowListener(this);
    }

    public void windowClosing(WindowEvent event) {
        System.exit(0);
    }

    public void windowClosed(WindowEvent event) {}
    public void windowOpened(WindowEvent event) {}
    public void windowIconified(WindowEvent event) {}
    public void windowDeiconified(WindowEvent event) {}
    public void windowActivated(WindowEvent event) {}
    public void windowDeactivated(WindowEvent event) {}

    public static void main(String args[]) {
        JoglTestApp app = new JoglTestApp();
        app.setVisible(true);
    }
}
