Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Windows explorer type split pane

Posted on 2004-08-24
9
Medium Priority
?
314 Views
Last Modified: 2013-12-03
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.
0
Comment
Question by:cathalmchale
  • 6
  • 2
9 Comments
 
LVL 12

Accepted Solution

by:
Giant2 earned 200 total points
ID: 11882287
* what classes should I have and extend?
I believe you must extends the Model creating your own (TableModel & TreeModel).

 * any pointers with how to handle the XML idea because I know nothing!!
For managing XML there is java XML API with DOM objects.
0
 
LVL 12

Expert Comment

by:Giant2
ID: 11882314
0
 
LVL 92

Expert Comment

by:objects
ID: 11887171
not sure if you are aware of JSplitPane or not.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 12

Expert Comment

by:Giant2
ID: 11889475
0
 

Author Comment

by:cathalmchale
ID: 11911104
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!
0
 
LVL 12

Expert Comment

by:Giant2
ID: 11911118
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.
0
 
LVL 12

Expert Comment

by:Giant2
ID: 11911137
adding manually:
    JPanel ppp=new JPanel(new BorderLayout());
    ppp.add(yourJTable.getTableHeader(),BorderLayout.NORTH);
    ppp.add(yourJTable,BorderLayout.CENTER);
    scrolPane.getViewport().add(ppp,null);
0
 

Author Comment

by:cathalmchale
ID: 11911370
thats it now, thankyou :)

Cathal
0
 
LVL 12

Expert Comment

by:Giant2
ID: 11911382
Thanks.
Happy to help you.

Bye, Giant.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question