• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need "file displaying UI" like JFileChooser's. How to get it?

 
Florin Constantinescu
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to use a file displaying UI which looks like the correspondent which JFileChooser uses. Just that component(the one which
contains the JTable used for the "Details" option in the popup menu, etc). But how to obtain it? I've looked in JFileChooser.java and
BasicFileChooserUI.java, but it seems that the UI it is assembled somehow "on the fly", using UIManager's facilities and some other
things(a very complicated approach). I was hoping rather that it exists something already wrapped in an object and used.
Is there such a thing somewhere in the JDK?
 
santhosh varala kumar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Florin Constantinescu wrote: I need to use a file displaying UI which looks like the correspondent which JFileChooser uses. Just that component(the one which
contains the JTable used for the "Details" option in the popup menu, etc). But how to obtain it? I've looked in JFileChooser.java and
BasicFileChooserUI.java, but it seems that the UI it is assembled somehow "on the fly", using UIManager's facilities and some other
things(a very complicated approach). I was hoping rather that it exists something already wrapped in an object and used.
Is there such a thing somewhere in the JDK?


Can you please provide proper expected screenshot?
 
Rob Spoor
Sheriff
Pie
Posts: 20611
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why can't you create a simple JTable yourself with that data? Because it's not that hard to retrieve the data, as this little example shows:
 
Florin Constantinescu
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
santhosh varala kumar wrote:
Can you please provide proper expected screenshot?


Here is the screenshot:

jfc.jpg
[Thumbnail for jfc.jpg]
JFileChooser Screenshot
 
Florin Constantinescu
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:Why can't you create a simple JTable yourself with that data? Because it's not that hard to retrieve the data, as this little example shows:


Well, I will create it if there isn't another possibility. The thing is that a simple JTable wouldn't do quite right the job for several reasons like:

1. I will have to name myself the table's columns, and a more complex approach of the application will require language support(and I will have to build it).
2. I will have to create more than a JTabel; some JLists too(these correspond to the other options which could exist in the popup menu - Icons, List, etc). Adding the sorting
functions which are required and the popup menu, it will take some work&time to be done.
3. If there's already something like this build up and works, why not use it?

Although, I think I'll give it a try, building myself the UI. But if some new information comes up....

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic