functional/ControlsTests/src/javafx/scene/control/test/colorpicker/ColorPickerApp.java

Print this page

        

@@ -132,21 +132,23 @@
 
             HBox hb = (HBox) getRoot();
             hb.setPadding(new Insets(5, 5, 5, 5));
             hb.setStyle("-fx-border-color : green;");
 
-            Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build();
+            Button hardResetButton = new Button("Hard reset");

+            hardResetButton.setId(HARD_RESET_BUTTON_ID);

             hardResetButton.setOnAction(new EventHandler<ActionEvent>() {
                 public void handle(ActionEvent t) {
                     HBox hb = (HBox) getRoot();
                     hb.getChildren().clear();
                     prepareMainSceneStructure();
                     prepareScene();
                 }
             });
 
-            Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build();
+            Button softResetButton = new Button("Soft reset");

+            softResetButton.setId(SOFT_RESET_BUTTON_ID);

             softResetButton.setOnAction(new EventHandler<ActionEvent>() {
                 public void handle(ActionEvent t) {
                     tb.refresh();
                     ColorPicker newOne = new ColorPicker();
                     testedColorPicker.setValue(newOne.getValue());

@@ -166,12 +168,15 @@
         }
 
         private HBox setColorHbox() {
             HBox hb = new HBox();
             Label lb = new Label("Set color");
-            final TextField colorTf = TextFieldBuilder.create().prefWidth(100).id(SET_COLOR_TEXT_FIELD_ID).build();
-            Button bt = ButtonBuilder.create().text("Set!").id(SET_COLOR_BUTTON_ID).build();
+            final TextField colorTf = new TextField();

+            colorTf.setPrefWidth(100);

+            colorTf.setId(SET_COLOR_TEXT_FIELD_ID);

+            Button bt = new Button("Set!");

+            bt.setId(SET_COLOR_BUTTON_ID);

             bt.setOnAction(new EventHandler() {
                 public void handle(Event t) {
                     testedColorPicker.setValue(Color.web(colorTf.getText()));
                 }
             });