GridPane.setHgrow(movieNameField, Priority.ALWAYS);
GridPane.setHgrow(languageCombo, Priority.ALWAYS);
GridPane topPane = new GridPane();
topPane.setHgap(5);
topPane.setVgap(10);
topPane.setPadding(new Insets(10, 25, 15, 25));
topPane.add(movieNameLabel, 1, 1);
topPane.add(languageLabel, 1, 2);
topPane.add(movieNameField, 2, 1, 2, 1);
topPane.add(languageCombo, 2, 2);
topPane.add(searchButton, 3, 2);
HBox.setHgrow(topPane, Priority.ALWAYS);
HBox topBox = new HBox();
topBox.getChildren().add(topPane);
table = new TableView<Subtitle>();
table.setEditable(false);
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
table.setItems(data);
TableColumn idCol = new TableColumn("ID");
idCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("id"));
TableColumn titleCol = new TableColumn("Title");
titleCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("name"));
TableColumn uploadedCol = new TableColumn("Uploaded");
uploadedCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("uploadedDate"));
TableColumn yearReleasedCol = new TableColumn("Year Released");
yearReleasedCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("year"));
TableColumn kindCol = new TableColumn("Kind");
kindCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("kind"));
TableColumn seasonCol = new TableColumn("Season");
seasonCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("season"));
TableColumn episodeCol = new TableColumn("Episode");
episodeCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("episode"));
table.getColumns().addAll(idCol, titleCol, uploadedCol, yearReleasedCol, kindCol, seasonCol, episodeCol);
linkField = new TextField("Download Link");
mountButton = new Button("Mount");
downloadButton = new Button("Download");
linkField.setEditable(false);
HBox.setHgrow(linkField, Priority.ALWAYS);
HBox bottomBox = new HBox(5);
bottomBox.setPadding(new Insets(20, 5, 15, 5));
bottomBox.getChildren().addAll(linkField, mountButton, downloadButton );
BorderPane root = new BorderPane();
root.setTop(topBox);
root.setCenter(table);