我试图将一个按钮和一个字符串彼此相邻放置到ArrayList中每个对象的滚动窗格中。这意味着我需要多次将此附加到滚动窗格。
@FXML
private ScrollPane scrollElem;
@FXML
private void getElements(MouseEvent event){
customer obj = writeCustomerToFile.getObject();
ArrayList<customer> array = obj.putCustomersInArray();
Label scrollContent = new Label();
scrollContent.setText("");
Button button = new Button();
scrollElem.setContent(scrollContent,button);
}
//I am looking for something similar code shown above