package at.kelvyn.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import org.swixml.SwingEngine;

public class SwiXMLTest {
	public JFrame frame;
	public JTextField title, auhtor;
	public JLabel ltitle;
	public JButton saveButton;
	public SwiXMLTest() {
		try {
			SwingEngine engine = new SwingEngine(this);
            //Engine erzeugen und das GUI Objekt übergeben
			engine.render("gui.xml");//die XML datei
			frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //schließen Operation
			frame.setVisible(true);//Fenster sichtbarkeit auf True
			saveButton.addActionListener(
					new ActionListener(){
						public void actionPerformed(ActionEvent e) {
							//Aktion für Save Button
						}
					}
				);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
		}
	}
	public static void main(String[] args){
		new SwiXMLTest();//Objekt Instanzieren
	}
}
