package transport;

import java.awt.Component;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;
import javax.swing.JScrollPane;


public class TetsTransport {
	public TetsTransport(){
		TransportModelsBuilder b = new TransportModelsBuilder("c://ICS//xml//TransportICS.xml");
		JFrame frame = new JFrame("TreeTable");
		TransportICS ics = (TransportICS)((TransportProfile)b.vectTransProfiles.get(0)).vectTransportICS.get(2);
		TransportTableModel model = new TransportTableModel(ics.root);
		JTreeTable treeTable = new JTreeTable(model);

		frame.addWindowListener(new WindowAdapter() {
		    public void windowClosing(WindowEvent we) {
			System.exit(0);
		    }
		});

		frame.getContentPane().add(new JScrollPane((Component)treeTable));
		frame.pack();
                frame.setVisible(true);
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new TetsTransport();

	}

}
