Solved

Windows explorer type split pane

Posted on 2004-08-24
9
267 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 50 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
 
LVL 12

Expert Comment

by:Giant2
ID: 11889475
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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 last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
The viewer will learn how to implement Singleton Design Pattern in Java.

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now