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 how to add long text to GridPane - Wrap in ScrollPane ? How?

I'd like to add long text to my app. When I click POKAŻ button it shows me my dream fields(String) from class called Dream. Here I have a problem. The content of my dream is very long and it is not completely displayed. When i wrap it inside a…
Paweł Stanecki
  • 454
  • 2
  • 10
  • 24
0
votes
2 answers

java fx gridpane setpadding

I am trying to set the padding for my GridPane, but every time I set the padding it gives me the error message: incompatible types: java.awt.Insets cannot be converted to javafx.geometry.insets Every website I go to and every search states to…
user2829664
0
votes
0 answers

can I populate data from sqlite into a gridPane?

I know you can populate date from database into a tableView, edit its values and drag and drop rows, but what I need to is get data from database and and drag and drop from cell to cell, I am thinking if I am able to populate data into an empty…
Jessica
  • 11
  • 1
  • 6
0
votes
0 answers

How to add an unconstrained TextField to a GridPane using SceneBuilder?

I am trying to use Java FX (in Eclipse). I am building a GridPane using Scene Builder and want to add a TextField to the GridPane which is freely resizable, i.e. isn't constrained by the grid. How do I do that?
0
votes
1 answer

how to set TextField in 4 columns spaces JavaFx

I want to make a calculator in JavaFx. I am using GridPane in order to set the position of calculator buttons and a Textfield. My question is: how can I set TextField in 4 column spaces? In the following example: TextField userTextField = new…
0
votes
1 answer

Failure to Create a Grid Pane with javafx.aplication

So I have been trying to create a matrix of 1's and 0's, then search for the largest square(block) of 1's. I wanted to use a GridPane to display the matrix. However I keep getting an error because of this line grid.add(z,i,j); How can I fix this?…
MHCKQW
  • 1
  • 1
0
votes
2 answers

JavaFX print multiple pages from a grid pane

I would like to use a Grid Pane to print multiple pages. The data comes from a CSV file Can someone suggest a solution? Here is the code I have been using to print it has a Grid Pane that is wrapped in a Pane the process as it is written displays…
James_Duh
  • 1,321
  • 11
  • 31
0
votes
1 answer

How can I access a control that's in a grid pane?

I have defined a grid pane in a java fxml file as follows: ...
0
votes
1 answer

Adding Shapes to GridPane results in wrong Position

I got the task to draw some points on a map. Wrote some code but currently every point I create via shapes will be added to the wrong position inside of my gridpane. Oh and I'm using JavaFX. I added an imageView to the index 0,0 of my GridPane and…
0
votes
1 answer

How to get object from combobox cell?

I have a ComboBox of objects with GridPane set as Graphic for displaying combobox list. GridPane has 3 columns for image, item's label and a StackPane. I want to click on StackPane and get object that corresponds to this row, but through…
Alyona
  • 1,682
  • 2
  • 21
  • 44
0
votes
2 answers

Why am I getting an "exception while running" error?

I made an array of Images to be set with a lesser number of image views. I want 10 images to randomly assign themselves to 4 Image views and then be displayed through the gridpane. Every time I run the code I get an error, "exception while running…
user3543798
  • 35
  • 1
  • 6
0
votes
1 answer

Rotating a GridPane in javaFX using CSS

I'm having a lil' problem. I am asked to make a game, so now I got the layout, I yet have to make sure that when a CheckBox called 'roteer'; is active, I need to rotate the entire GridPane in which the game is made 180 degrees. For example, I have a…
Ivar Reukers
  • 7,560
  • 9
  • 56
  • 99
0
votes
1 answer

How do I output the contents of an array to a JavaFX Gridpane?

I have an object with a for loop which switches the contents of array elements around for a user-specified number of times. I can currently output the updated array to the Eclipse console at the end of each loop, but I now have to display the…
user4142722
0
votes
1 answer

JavaFX Custom ListCell HGrow

I have a ListView with a custom ListCellFactory. In my CustomListCell implemenation I use setGraphic to set the list item graphic to a GridPane but I am not able not let the GridPane fill the whole width of the ListView. The following is a short…
Crine
  • 805
  • 7
  • 24
0
votes
1 answer

How do I prevent a Labeled control from resizing other components when its text is changed?

As the title implies, when I change the text of a javafx.scene.control.Label, it resizes all components which are contained in the same layout. How exactly do I prevent this? Here is my FXML markup:
Pavan P
  • 645
  • 8
  • 17