HBox is created as following:
private Parent createTopBar() {
final HBox box = new HBox(2.0);
box.setAlignment(Pos.BASELINE_LEFT);
final TextBox nameInput = new TextBox(20);
final PasswordBox passwordInput = new PasswordBox();
final Button loginCmd = new Button("Log In...");
final ProgressBar progressView = new ProgressBar(0.0);
final Label label1 = new Label("Name:");
final Label label2 = new Label("Password:");
box.getChildren().addAll(
label1,
nameInput,
label2,
passwordInput,
loginCmd,
progressView
);
return box;
}
The resulting layout is broken as shown at the attached screenshot.
private Parent createTopBar() {
final HBox box = new HBox(2.0);
box.setAlignment(Pos.BASELINE_LEFT);
final TextBox nameInput = new TextBox(20);
final PasswordBox passwordInput = new PasswordBox();
final Button loginCmd = new Button("Log In...");
final ProgressBar progressView = new ProgressBar(0.0);
final Label label1 = new Label("Name:");
final Label label2 = new Label("Password:");
box.getChildren().addAll(
label1,
nameInput,
label2,
passwordInput,
loginCmd,
progressView
);
return box;
}
The resulting layout is broken as shown at the attached screenshot.
- relates to
-
JDK-8128852 Labeled controls always return computed minHeight
- Closed