Reputation: 1107
I am starting to learn JavaFX (2 days in) and I am making an implementation of a file browser. So to give you an example I am looking for something like this
What element should I use for the representation of the right panel (the one with the icon view of the files)?
I need it to point at a specific directory in my system, lets say 'music', and display all folders stored in it.
I looked for tutorials online and other examples but I couldn't find anything similar.
My only requirement is to look this way and also to support drag and drop.
Thanks
EDIT: I am using Scene builder btw
Upvotes: 1
Views: 1067
Reputation: 159341
Use a ControlsFX GridView for the right pane of file icons.
GridView is a fast, virtualised grid container similar to ListView, except that there can be multiple cells on each row. Great for showing images!
GridView probably doesn't natively support drag and drop, so you will need to code that up yourself.
Here is a sample of some drag and drop functionality in a virtualized control (in this case a ListView), which you might be able to adapt: How to create a reorder-able TableView in JavaFx.
Upvotes: 4