functional/ControlsTests/src/javafx/scene/control/test/textinput/TextFieldPropertiesApp.java

Print this page

        

@@ -27,12 +27,12 @@
 import javafx.event.ActionEvent;
 import javafx.event.Event;
 import javafx.event.EventHandler;
 import javafx.scene.Scene;
 import javafx.scene.control.Button;
-import javafx.scene.control.ButtonBuilder;
 import javafx.scene.control.TextField;
+import static javafx.scene.control.test.textinput.TextControlApp.ADD_TEXT_BUTTON_ID;

 import javafx.scene.layout.Pane;
 import test.javaclient.shared.Utils;
 
 /**
  * @author Alexander Kirov

@@ -77,11 +77,12 @@
             tested.setFocusTraversable(fresh.isFocusTraversable());
         }
 
         @Override
         public void addControlSpecificButtons(Pane pane) {
-            Button setOnActionListenerButton = ButtonBuilder.create().id(SET_ON_ACTION_BUTTON_ID).text("Set on action listener").build();
+            Button setOnActionListenerButton = new Button("Set on action listener");

+            setOnActionListenerButton.setId(SET_ON_ACTION_BUTTON_ID);

             setOnActionListenerButton.setOnAction(new EventHandler() {
 
                 public void handle(Event t) {
                     ((TextField) testedTextInput).onActionProperty().setValue(new EventHandler<ActionEvent>() {
 

@@ -90,11 +91,12 @@
                         }
                     });
                 }
             });
 
-            Button addTextButton = ButtonBuilder.create().id(ADD_TEXT_BUTTON_ID).text("Add \"sometext\"").build();
+            Button addTextButton = new Button("Add \"sometext\"");

+            addTextButton.setId(ADD_TEXT_BUTTON_ID);

             addTextButton.setOnAction(new EventHandler() {
 
                 public void handle(Event t) {
                     testedTextInput.setText(testedTextInput.getText() + "some\ntext");
                 }