Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. /**
  2. * Create a basic text field for input and a refresh button.
  3. */
  4. private void makeControls() {
  5.  
  6. Label label1 = new Label("Placement:");
  7. textField = new TextField();
  8. textField.setPrefWidth(300);
  9. Button button = new Button("Refresh");
  10. button.setOnAction(e -> {
  11. makePlacement(textField.getText());
  12. textField.clear();
  13. });
  14. HBox hb = new HBox();
  15. hb.getChildren().addAll(label1, textField, button);
  16. hb.setSpacing(10);
  17. hb.setLayoutX(130);
  18. hb.setLayoutY(VIEWER_HEIGHT - 50);
  19. controls.getChildren().add(hb);
  20.  
  21. button.setOnAction(event -> getImage());
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement