How can you make such stripes (hatching) in a treeview?
Googled as best I could, nowhere and there is no hint of such a thing

javafx:
enter image description here
swing:
enter image description here

  • one
    As far as I know, now this does not do at all. He himself asked such a question - Andrew Bystrov
  • And where did you get this screen from? - Andrew Bystrov
  • @Bogdab Bida even lies some kind. This screen looks like a swing tree - Andrew Bystrov
  • Here are 2 screenshots, 2nd is an example (this is a swing), 1st proof of the possibility of this in javafx - BogdanBida

1 answer 1

Very simple:

TreeItem<HBox> item=new TreeItem<HBox>(new HBox(new ImageView(new Image(inputStream)),new Label("Root"))); item.getChildren().add(new TreeItem<HBox>(new HBox(new ImageView(new Image(inputStream)),new Label("Item1")))); TreeView<HBox> treeView=new TreeView<HBox>(item); 

If desired, you can make instead of HBox a class that will automatically change the image depending on the structure of the TreeItem.