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
2
votes
0 answers

How to add FXML-styled GridPane to pagination in JavaFX

I am currently working on a project that requires me to apply multiple GridPanes to a pagination in JavaFX 8. I already have a GridPane attached to a VBox, in which were styled in SceneBuilder. My question is, how can I basically make multiple…
MariposaM
  • 107
  • 1
  • 12
2
votes
1 answer

JavaFX GridPane - Configuring controls to grow and occupy all the available space

Trying to achieve: Text Field 1 and Text Field 3 should occupy all the available free space Button 1 and Button 2 should have same width Issue: Text Field 1 and Text Field 3 are NOT occupying all the available free space (though they are growing…
Venkata Raju
  • 4,866
  • 3
  • 27
  • 36
2
votes
1 answer

Center GridPane Square in ScrollPane Viewport

I have a 20x20 GridPane of uniformly sized squares which is representing data from a two-dimensional array of the same size, placed in a ScrollPane such that one can use it to pan around. The width and height in pixels of the GridPane are both much…
narf0708
  • 100
  • 8
2
votes
3 answers

Dynamically resizing figures as the window is resized in JavaFX

I have an assignment where I am suppose to create 4 circles with 4 triangles inside to resemble a fan, create a clock that will randomly change its time each run of the program, and create a hangman figure. I have completed all of those figures but…
B.Mack
  • 37
  • 1
  • 7
2
votes
1 answer

JavaFX pannable GridPane

For my current project, I need a large even grid with a transparent background that one can zoom and pan across. I initially tried to use a ScrollPane with its setPannable(true), but soon discovered that a scrollpane background will remain opague…
narf0708
  • 100
  • 8
2
votes
2 answers

How to set multiple buttons and add them to a gridPane

for a GUI i have to set multiple buttons to a GridPane. For this i want to ask if there is a way to add multiple buttons in a Grid in a more elegant way than i do. Here is an extractof my Code. Button button0 =new Button("0"); Button button1…
Marco Jakob
  • 67
  • 4
  • 9
2
votes
2 answers

JavaFX GridPane cells not auto-sizing to content

I am writing a JavaFX program that makes a grid of random colors. When the window is resized the grid should adjust so it is as big as possible while still remaining square and leaving space on the bottom for the text. Everything is working like it…
Trevor M
  • 191
  • 1
  • 6
2
votes
1 answer

gridpane javafx node column span how to use?

hey i have a gridpane and for one of the nodes i want it to be able to take up the whole row. but i cant seem to figure out how to use GridPane.setColumnSpan(node, column span); heres my code grid.getChildren().addAll(animalFields(animal)); …
Grimeire
  • 339
  • 1
  • 6
  • 19
2
votes
1 answer

put 2 radiobuttons in one column without overlapping JavaFX

I wanted to ask for help with one problem. I want to move two radio button in one column so that they will both take only as much space as textbox above them. How can I do this? Here is the code and screenshot of current improper version: Please do…
XSorcery
  • 83
  • 1
  • 10
2
votes
2 answers

Creating an editable (paintable) grid in JavaFX

Currently there are 2 sets of grids. the first gridset is a 5x4 grid which has images of the map. On top of that, there's a grid which has all of the small tiles to each of the 5x4 grid boxes. So I need to have large images in a 5x4 grid pattern,…
Michael Gates
  • 107
  • 1
  • 12
2
votes
1 answer

JavaFX - Gridpane Growing Issue

Hi I'm currently playing around with the GridPane in JavaFX and stumbled upon a problem... I want to create a layout with three rows where the middle one grows and takes up all available space but I just can't get it to work. The middle row grows…
Estrozix
  • 25
  • 1
  • 1
  • 6
2
votes
1 answer

How to get same vertical size of TitledPanes in a Gridpane? (JavaFX, Scenebuilder)

i have a problem with the vertical size of the right TiteldPane (see picture below). Both TitledPanes are put in a GridPane. I want that the smaller one gets the same height like the left one. I tried to set the Vgrow to "always" of the right…
Gero
  • 23
  • 2
2
votes
1 answer

Apply css style to gridpane row

I'm using GridPane in JavaFx, I want to set the min height of all rows to 30. I know how to change the row constraint dynamically from code. But I want to do it from css, in order to apply it for all GridPanes.
Lion_CH
  • 78
  • 2
  • 8
2
votes
1 answer

JavaFX: Organize controls in rows (in gridpane) using FXML

I have a GUI with a lot controls (Labels, Textfields, Comboboxes and Checkboxes). I organize them in a Gridpane and would like to have them in rows and columns (like it is intended with gridpane layout). If I use FXML I write it like…
keanni
  • 528
  • 6
  • 15
2
votes
1 answer

Make Objects of Gridpane fill screen

I am currently trying to learn JavaFX. I have created a small setup with a Gridpane shown in the screenshot below I made the background of the gridpane red so as you can see it fills the whole screen. But unfortunately the labels and textfields…
Valentin
  • 280
  • 5
  • 15