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

JavaFX: Adding many nodes with fxml

I am using a GridPane to represent a a board for Go. I need to create a 19x19 board, then have a StackPane for each spot in the GridPane. For the grid, I copy pasted a bunch of rows and columns in the fxml file which is definitely not ideal. If I…
and
  • 23
  • 5
0
votes
1 answer

GridPane acts as mouseTransparent although not set

What do I want to do? I am facing a problem with a fxml based javafx application. I want to create a simple form sheet to enter some numerical values that are supposed to be stored in a file uppon confirmation. What is the problem? The form does…
L.Revan
  • 3
  • 3
0
votes
2 answers

Extracting text from dynamically created textfields inside various rows of gridpane

I'm trying to create a grid with a textbox on each row where user can enter a number, and corresponding number of new rows are added. This works well, as shown below in the screenshot. Now I'm trying to extract the text from those textfields…
0
votes
0 answers

JavaFX Gridpane replacement while panning/scrolling

Currently, I'm trying to implement panning on a (game) map, the visual part of which is a gridpane. Since the underlying data model may specify a huge map, I only want to show a small (say 40x40) tile map. When I pan/scroll the map, I currently set…
Simon
  • 67
  • 6
0
votes
2 answers

GridPane with gaps inside ScrollPane rendering wrong

I want to have a rectangular grid with square cells, which can be zoomed and dragged (like you would a map). So I put it in a ScrollPane, altough it behaves rather weirdly at certain sizes. The size of the grid will change dynamically. On the…
Hawk
  • 2,042
  • 8
  • 16
0
votes
1 answer

Chess Border around Pawns JavaFX

I am creating a chess game and i am stuck at one thing for a couple of days. So i want to create event when user moves over a figure the image of figure replaces to another image with border and when user moves away the image must return to normal.…
xCrazy
  • 3
  • 4
0
votes
0 answers

JavaFX VBox not aligning inside a GridPane

I'm trying to build a calculator in JavaFX and a VBox is not aligning with the other nodes inside the GridPane. I'm using a GridPane as my root node, and placing individual buttons at each cell location. The right most column is a VBox which…
ki81
  • 75
  • 1
  • 6
0
votes
1 answer

Sticky Headers on JavaFX Gridpane

I was wondering if there is a possibility to implement Sticky Headers on a GridPane in JavaFX, meaning a row of the GridPane that stays in place while you can scroll through the remaining rows of the pane.
Samarek
  • 444
  • 1
  • 8
  • 22
0
votes
1 answer

JavaFX - How to fit a GridPane to fill the entire HBox using both scaling width and static width of ColumnConstraints?

I am having issues filling my entire custom HBox with a GridPane that is dynamically created. The HBox exists inside a ListView and already dynamically scales with the ListView without any issues. The issue is that I want some things in my GridPane…
Alex Tygesen
  • 3
  • 1
  • 3
0
votes
1 answer

How does Gridpane stretch the full height of AnchorPane in JavaFX? AnchorPane is a root of main window

I want to create an application based on GridPane. For adaptivity I use AnchorPane. The layout stretches well across the width, but at a height it's bad. How to fix?
0
votes
1 answer

Every time I add a row to gridpane it shows me IllegalArgumentException

How my output gets displayed Error which I get after i try to output second line from text file How my text file gets written I want to add rows to gridpane dynamically but it won't let me do it. It says illegalArgumentException. I have uploaded…
Utsav Dave
  • 85
  • 1
  • 3
  • 9
0
votes
1 answer

gridpane javafx clickable cells that get toggled and untoggled

I am trying to create a gridpane that is toggled/untoggled as the user clicks on specific cells. For example, when the user clicks on a cell with the content "*", I would like the content of that specific cell to be changed into a blank cell " ".…
user3406764
0
votes
1 answer

JavaFX: how to call a method from Controller in Main

I want to call the method getRow() inside Controller from the main method of class Main in JavaFX. I really have no idea how to use JavaFX so I don't even know if that's something you should do with Controller. public class Controller { public…
0
votes
1 answer

(JAVAFX) Add and display images in a gridpane

I can currently add different labels based on their class type to a gridpane while iterating though an array. How would I be able to do this, but with certain images instead? I.e if the object in the array is of type: Class 1, then add the image…
0
votes
1 answer

fx:id="grid" stays null in controller

grid stays null when user clicks the button that calls 'pressLookUp' User is suppose to go from an old stage to the new one in the fxml file. And before the new window is shown, I want to add in values to the grids children from the database using…
Michael Lin
  • 11
  • 1
  • 5