ListView with custom content in JavaFX
问题 How i can make custom ListView with JavaFx for my app. I need HBox with image and 2 Labels for each line listView. 回答1: You need to provide a custom CellFactory via ListView.setCellFactory(...) Working example public class CustomListView extends Application { private static class CustomThing { private String name; private int price; public String getName() { return name; } public int getPrice() { return price; } public CustomThing(String name, int price) { super(); this.name = name; this