Solved

Windows explorer type split pane

Posted on 2004-08-24
9
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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!

 
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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
SHA2 certs for IIS AND Java? 2 122
hibernate jars 4 59
JAVA API design with micro service cloud in mind 1 78
Need Help! Getting a syntax error and don't understand why 3 40
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

749 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