cathalmchale
asked on
Windows explorer type split pane
Hi,
I am unsure how I will implement the following but I will try phrase the question as best I can, and perhaps someone can point me in the right direction?
I want a split pane - left component is a Windows explorer type tree of directories only, the right component is a JTable of the files (exclude sub-directories) in the currently selected node.
*the directory tree starts at a specified root location and the user cannot go up a level
*the right pane lists files in a table - associated attributes (from a hardcoded attribute list) can be added / removed as columns in the table -> these attributes
are XML based and are retrieved from the individual files
Any ideas?? - I want it all to be reuseable,
*the directory tree specifies a root
*the file table specifies its attributes
I just want help with:
* what classes should I have and extend?
* any pointers with how to handle the XML idea because I know nothing!!
Thankyou.
I am unsure how I will implement the following but I will try phrase the question as best I can, and perhaps someone can point me in the right direction?
I want a split pane - left component is a Windows explorer type tree of directories only, the right component is a JTable of the files (exclude sub-directories) in the currently selected node.
*the directory tree starts at a specified root location and the user cannot go up a level
*the right pane lists files in a table - associated attributes (from a hardcoded attribute list) can be added / removed as columns in the table -> these attributes
are XML based and are retrieved from the individual files
Any ideas?? - I want it all to be reuseable,
*the directory tree specifies a root
*the file table specifies its attributes
I just want help with:
* what classes should I have and extend?
* any pointers with how to handle the XML idea because I know nothing!!
Thankyou.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
not sure if you are aware of JSplitPane or not.
>aware of JSplitPane
??
Here is the tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/components/splitpane.html
??
Here is the tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/components/splitpane.html
ASKER
Thanks 4 ur help, it proved not so difficult at all!!
On another point can anyone help? My JTables are never showing column headers - i extend AbstractTableModel and implement the method:
public String getColumnName(int column)
{
return visibleFields[column];
}
but still no headers!! what am i doing wrong?i!
On another point can anyone help? My JTables are never showing column headers - i extend AbstractTableModel and implement the method:
public String getColumnName(int column)
{
return visibleFields[column];
}
but still no headers!! what am i doing wrong?i!
If the JTable is displayed in a JScollPane, the Header are visible automatically.
If no, you must add the header manually to the panel where you are displaying.
Bye, Giant.
If no, you must add the header manually to the panel where you are displaying.
Bye, Giant.
adding manually:
JPanel ppp=new JPanel(new BorderLayout());
ppp.add(yourJTable.getTabl eHeader(), BorderLayo ut.NORTH);
ppp.add(yourJTable,BorderL ayout.CENT ER);
scrolPane.getViewport().ad d(ppp,null );
JPanel ppp=new JPanel(new BorderLayout());
ppp.add(yourJTable.getTabl
ppp.add(yourJTable,BorderL
scrolPane.getViewport().ad
ASKER
thats it now, thankyou :)
Cathal
Cathal
Thanks.
Happy to help you.
Bye, Giant.
Happy to help you.
Bye, Giant.
http://java.sun.com/developer/earlyAccess/xml/examples/index.html