Hi guys. Help extends AbstratstTreeTableModel so that i can work with databases and display on JTable in tree view. I found an example but it is for file system FileSystemModel i need for database.
here my code:
public class DataBaseModel extends AbstractTreeTableModel implements TreeTableModel {
 
	private ArrayList<String>				columnNames	= new ArrayList<String>();
	private ArrayList<ArrayList<Object>>	data		= new ArrayList<ArrayList<Object>>();
 
	static protected Class[]  columnTypes = {TreeTableModel.class, Integer.class, String.class, String.class,  Integer.class, Double.class, Double.class};
 
	public DataBaseModel(Object root) {
		super(root);
	}
 
	@Override
	public Object getChild(Object parent, int index) {
		return null;
	}
 
	@Override
	public int getChildCount(Object parent) {
		return 0;
	}
 
	@Override
	public int getColumnCount() {
		return columnNames.size();
	}
 
	@Override
	public String getColumnName(int column) {
		return columnNames.get(column);
	}
 
	@Override
	public Object getValueAt(Object node, int column) {
		synchronized (data) {
			return data.get(0).get(column);
		}
	}
}
But what to do next is not savvy my head.
Thank an advance!