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
1
vote
1 answer

GridPane not binding to BorderPane

I'm fairly new to JavaFX and FXML. I've coded some java swing but that is a long time ago. To learn something new I'm creating a little board game but I can't seem to line up my GridPane with Rectangles inside it properly (The GridPane is inside a…
patski
  • 329
  • 6
  • 15
1
vote
1 answer

Adding duplicate objects to GridPane as new row

I want to dynamically add new rows based on the input number from text field. I have prepared this row (textField and comboBox) in fxml (scene builder) outside of visible scope. So I have reference to these objects which I want to…
Wlad
  • 410
  • 1
  • 9
  • 27
1
vote
2 answers

Javafx Gridpanes content exceeds size

I don't know why the cell content can exceed the limits of the gridpanes rowconstraint, although a maximum is set. I tried to clip it somehow, but I don't get the actual height of the cell (when I would change it dynamically). As you can see on the…
blaster
  • 845
  • 1
  • 10
  • 25
1
vote
0 answers

How to organize images in Gridpane?

if(list != null){ for(File file : list){ //Image image = new Image(file.toURI().toString()); final Image image = new Image(new FileInputStream(file), 150, 0, true,true); ImageView imageView = new…
Kesh
  • 75
  • 1
  • 1
  • 7
1
vote
1 answer

How to obtain the information inside a gridpane (javaFX)

I have a method that creates new TextFields in a gridPane (2x8). I was wondering, once they are created, how do I access the information within each index (as in: 0,0 - 1,0, etc). Here's the code: private void…
GFV450
  • 111
  • 1
  • 11
1
vote
1 answer

JavaFX: GridPane calculating incorrect column width

I would have expected that a GridPane calculates each column's default width according to the maximum preferred width of all elements in that column. However, in my code it seems to calculate a too small width, resulting in one of my labels in the…
user3237736
  • 845
  • 1
  • 9
  • 24
1
vote
1 answer

javaFX scene builder. APP is not responsive, doesn't grow to the RIGHT

I make an app in JavaFX. I use Scene Builder but I have problem with my GridPane. Could you tell me why my GridPane doesn't grow to the right ? Here is the screen od my app. Screen of my app and the FXML file:
Paweł Stanecki
  • 454
  • 2
  • 10
  • 24
1
vote
1 answer

Setting color of individual cells in a GridPane (JavaFX)

I'm making tetris for a class project, and I had the idea to utilize gridpane to divide the stage into evenly spaced rows and columns. I was going to change the color of each cell individually to simulate actual pieces, but I have no idea where to…
1
vote
1 answer

Spinner within gridpane has strange resize effects

My goal is to have a GridPane where every item is grown to its max size. When I use the Spinner component, however, there are some unexplainable resize effects: whenever the Spinner component gets focus, or the value changes, it grows a bit, until…
Teazl
  • 233
  • 3
  • 12
1
vote
1 answer

how to display a calendar controller from a fxml file in javafx

Is that possible to display a calendar controller from scene builder? I am trying to display a calendar which ideally has to be linked to a data property and time slot. Any help?
Jessica
  • 11
  • 1
  • 6
1
vote
0 answers

sizeToScene after adding child not working

I'm starting with Javafx and I have a doubt with automatic resizing. I have an empty grid pane in a window with a few text labels and buttons. The window is sized to match the content. I need to automatically resize the window when adding children…
Hernan Romero
  • 133
  • 10
1
vote
1 answer

JavaFX Graphical Glitch

I'm experiencing a weird graphical glitch on my application. The situation is that I am creating some GridPanes and adding them to a parent GridPane which is inside a ScrollPane. However, upon scrolling, some weird glitches begin occurring. Here is…
RoDeLoPo
  • 99
  • 1
  • 1
  • 6
1
vote
0 answers

JavaFX make content fit to Gridpane cell

So, I am trying to let the user upload pictures to a gridpane So far I managed to get the pictures to be shown, but the problem is that if the window size is changed the pictures stay the same size. I tried using computed sizes with margins but it…
Aginu
  • 156
  • 2
  • 17
1
vote
1 answer

GridPane not spanning the whole VBox

I'm trying to create a an invoice which I can later print. I'm using VBoxes and GridPanes to do it. The number of columns in the middle GridPane is variable. I'm building it using a loop. I've tried many different things to make the GridPane (GREEN…
UrsinusTheStrong
  • 1,239
  • 1
  • 16
  • 33
1
vote
0 answers

JavaFX Grid Pane - Set a row's height to be the same as a column's width?

Here is the definition for my grid pane:
5had3sofQu4rtz
  • 504
  • 5
  • 15