I tried to implement a standard example from here , which looks like this:
SplitPane sp = new SplitPane();
final StackPane sp1 = new StackPane();
sp1.getItems().add(new Button("Button One"));
final StackPane sp2 = new StackPane();
sp2.getItems().add(new Button("Button Two"));
final StackPane sp3 = new StackPane();
sp3.getItems().add(new Button("Button Three"));
sp.getItems().addAll(sp1, sp2, sp3);
sp.setDividerPositions(0.3f, 0.6f, 0.9f);
But in NetBeans IDE I get "cannot find symbol" message which points to lines of code where getItems
method is used. So, I ispected sp1
variable in IDE and see that there are no longer any getItems
, but I do not know what to use instead.
StackPane
没有getItems
方法,它使用getChildren()
!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.