2013/08/18

javafx fixed size label ect.

put it into a HBox
like the blow:
        HBox nameHBox = new HBox();
        nameHBox.setAlignment(Pos.CENTER_LEFT);
        nameHBox.setPrefHeight(22);
        nameHBox.setPrefWidth(100);

        CheckBox checkBox = new CheckBox();
        checkBox.setId(CHECKBOX + dto.getId());
        checkBox.setMnemonicParsing(false);
        checkBox.setText(dto.getName());
        checkBox.setSelected(true);

        nameHBox.getChildren().add(checkBox);

        result.getChildren().add(nameHBox);