package a3test.a2;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
//import jp.sourceforge.acerola3d.*;
import jp.sourceforge.acerola3d.a2.*;

public class A2 {
    JFrame frame;
    JPanel panel;

    public A2() {
        frame = new JFrame("A2");
        panel = new JPanel();

        frame.getContentPane().add(panel);

        Action2D a2 = null;
        try {
            a2 = A2Loader.load("x-res:///axis.a2");
        } catch (Exception e) {
            e.printStackTrace();
        }
        Image image = a2.getImage(2);
        ImageIcon ii = new ImageIcon(image);
        JLabel iii = new JLabel(ii);
        panel.add(iii);

        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent we) {
                disposeThis();
            }
        });
        frame.pack();
        frame.setVisible(true);
    }

    void disposeThis() {
        frame.dispose();
        System.exit(0);
    }

    public static void main(String args[]) {
        new A2();
    }
}
