2013-08-21 30 views
0

我有几个按钮,并希望在HBox中收集它们并将它们设置在垂直行中。目标是这样的形成类似的东西:http://vandelaydesign.com/images/navi/vertical.gif收集多个按钮

Button addButton = new Button("Add Expense"); 
addButton.setOnAction(new AddExpenseGUI(rootStage, data)); 

Button editButton = new Button("Edit"); 
addButton.setOnAction(new EditButtonListener()); 

我尝试了多种事情。这是我的一个想法,但我只是得到一个水平编队:

HBox a = new HBox(); 
a.getChildren().addALL(addButton, editButton); 
grid.add(a,0,0); 

任何想法?

回答