Questions tagged [gridpane]

GridPane lays out its children within a flexible grid of rows and columns

GridPane lays out its children within a flexible grid of rows and columns. If a border and/or padding is set, then its content will be layed out within those insets. A child may be placed anywhere within the grid and may span multiple rows/columns. Children may freely overlap within rows/columns and their stacking order will be defined by the order of the gridpane's children list (0th node in back, last node in front).

GridPane may be styled with backgrounds and borders using CSS

349 questions
0
votes
1 answer

Fill/Padding space between 2 Labels with dots in GridPane (JavaFX)

Starting point: GridPane with 2 Columns each Column has a Label Like-to-have output: space between the labels filled by dots So far I have only come across String solutions in which the target length of the combined String is known. But this…
Chiggiddi
  • 542
  • 1
  • 8
  • 26
0
votes
0 answers

JavaFX gridPane padding for specific cell

I'm making a custom gridPane as a form and have the alignment for the left column on the right and the alignment for the right column of the left. The last row is always the buttons (save/cancel), but I would like the padding for those to be higher…
Lennert Hofman
  • 585
  • 6
  • 21
0
votes
2 answers

Java-FX How to set image in a GridPane on click - game Othello

Hi i'm trying to click on a position (from 0 to 7) in my GridPane. I would set an image inside it. I tryed everything but i can't see any improvement... This is my board Here my code on click on grid @FXML private void clickGrid(MouseEvent…
Alberto32
  • 229
  • 1
  • 4
  • 14
0
votes
1 answer

Remove ImageView from Gridpane

I am programming a game in Java. It's kind of like a labyrinth. If a player clicks on a cell on a gridpane the player image moves there and I am struggling with removing the playerImage from the old position. Here is how i am creating the…
0
votes
0 answers

Position of Label on GridPane in JavaFX

I am using a GridPane with several cells. I add Label dynamically to each cell. I need each Label's position. My code is like below: @FXML GridPane graphHolder; Label label = new Label("A"); label.setWrapText(true); graphHolder.add(label, 1,…
0
votes
0 answers

javaFx—GridPane can delete node by inputing rowindex and coloumnindex

I don't want to use remove in this code chessPane.getChildren().removeAll(piece[0][chessPane.getRowIndex(piece[0][6].getImageView())-2].getImageView(), piece[0][chessPane.getRowIndex(piece[0][6].getImageView()) - 1].getImageView()); anyone can…
Yuhan-Lee
  • 1
  • 1
0
votes
1 answer

Dynamic Gridpane with TextFields and Checkboxes

I'm working on a project in which there are 2 tabs. On first tab's user interface there is a text field and a button. In the text field user can write any number till 100 and when he will press button Next, my application will go to the next tab on…
Junaid
  • 664
  • 5
  • 18
  • 35
0
votes
1 answer

GridPane specific Nodes

I tried to find a specific node using GridPane.getRowIndex(node). But I encountered the following error: at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1774) at…
0
votes
0 answers

JavaFX GridPane fitting in the ScrollPane which uses not all available space of the BorderPane

I have a scene similar to the one shown with the fxml code below (made with SceneBuilder): sample.fxml
K. Risma
  • 1
  • 1
0
votes
1 answer

JavaFX - Clicking inside GridPane prints out Pane instead of TextField

I'm trying to make a Sudoku Game in JavaFX. I made the 9x9 grid using GridPane and TextField. Now I want to change the background color of the TextField when user clicks inside it. To check that everyting is fine I am prining the target od the…
0
votes
1 answer

TextArea fit to a GridPane

I´m new to Java. I want to fit a TextArea in a GridPane. I tried this for the last few hours with this result: As you see, the TextArea is much bigger than my Gridpane. Here is my code: GridPane root = new…
Felix_T
  • 33
  • 7
0
votes
1 answer

GridPane stay centered while window is resized

Currently my gridpane stays centred on the X axis while the window is resized, how can I get it to stay centred on the Y axis as well? I have this in a tab in a TabPane: GridPane grid = new GridPane(); grid.setPadding(new Insets(20, 0, 0,…
J Hanes
  • 3
  • 5
0
votes
0 answers

Get rid of separating line in gridpanes colspan in javafx

is there any way to hide the line between columns with colspan property set in javafx gridpane ? for example - https://i.cubeupload.com/lPKvHQ.png
panarama
  • 71
  • 1
  • 12
0
votes
2 answers

Change TextField Display with RadioButton

I'm having a problem with Label and TextField placement in a gridpane in response to toggled RadioButtons. The window will display the same options except for two different labels and text fields which depend on which RadioButton the user has…
Cee721
  • 3
  • 4
0
votes
1 answer

Username and password are always incorrect with custom javafx login dialog

Really don't know what do to do here? Any help on where my next move could be so that I can get this up and running would be greatly appreciated! I am looking to roll this log in application into my next class project by using a combo box with this…
Aminal
  • 3
  • 3