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

Extracting values from multiple dynamically generated TextFields in a gridPane (JavaFX)

I'm trying to create a gridpane which will have dynamic number of rows, according to user input. Once number of rows are known, each row will have 8 objects that are a mix of TextFields and DatePicker. I can create them but now I'm having a hard…
0
votes
1 answer

JavaFX GridPane Program

The assignment: "Write a program that takes a positive integer n and displays an n x n checkerboard. Write the program so that it works for different values of n by changing only one line in your code. Use un-editable textfield objects in a gridpane…
0
votes
0 answers

how to fix Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Children: duplicate children added: parent = Grid

I am trying to change the text of a Button in a GridPane when the Button is clicked. I have successfully managed to do so. but, I am getting this exception. I have this function that changes the text. public void clicker(Button b) { if…
joezanini
  • 13
  • 1
  • 6
0
votes
2 answers

JavaFX get direction of mouse

How can I know in what direction the mouse is moving? I need to know if the mouse moves to the left, right, bottom or top of the scene. Thanks
Jens Vde
  • 43
  • 5
0
votes
0 answers

How to fit multiple ImageVIew in HBox, and GridPane (JavaFX)

I'm using FXML. I have a GridPane (6x7) and inside of that I have a HBox (at 2,2 grid position). In that HBox I have 10 ImageView. I want to display 10 images taking equal space, and without crossing the grid. How to do this as relative sizing? Here…
0
votes
1 answer

Manipulating the number of rows and columns in GridPane

I initialized rowSize (number of rows) and colSize (number of columns) inside the MapTest class. I created 3 methods: startStage1(), startStage2() and startStage3(); each is assigned to a button. Each method assigns the rowSize and colSize to a new…
Neo
  • 53
  • 2
  • 8
0
votes
1 answer

create many singleton objects of one object for gridPane in java

I have a gridPane with three columns(name, counter, timeStamp pos). For the column timeStamp pos I have an object where I can jump to a position or move to the next/previous position with the keyboard. Every timeStamp pos cell is an object. I have…
Yupp
  • 315
  • 3
  • 18
0
votes
0 answers

javafx load fxml into pane

Im trying to load fxml files into gridpane when init the parent controller. Each cell in gridpane will load the .fxml file. But i can't load the fxml file in init method. There is my code private GridPane gridDetailCollection; public void…
0
votes
0 answers

Is it possible to position elements in a cell of grid pane free in Scene Builder?

I have a "problem". I want add 3 Radio Buttons in a cell of a grid pane. I can do that but I wonder how can I change position the radio buttons in the scene builder. So that one radio button is at the top of the cell the other in the middle and the…
Lebron11
  • 656
  • 7
  • 18
0
votes
1 answer

JavaFX GridPane in ScrollPane is bigger than expected

While I was messing around with javafx, I've encountered such a thing: I created a GridPane, wrapped it in a ScrollPane and filled with Buttons, but changed RowConstraints and ColumnConstraints for GridPane beforehand. The problem is that horizontal…
Quipex
  • 37
  • 2
  • 10
0
votes
1 answer

Scrollable gridpane in javafx

im trying to add multiply VBox to a gridpane (called refPane in the following codesnippet) which is inside a scrollpane. int columnIndex = 0; int rowIndex = 0; int boxWidth = windowWidth/ITEMS_PER_ROW; int boxHeight =…
randomdev8712
  • 261
  • 1
  • 6
  • 23
0
votes
2 answers

Returning a node from a cell on GridPane. (JavaFX)

I have a school project or something like that and I am trying to make a sign up panel for users. This panel opens when user clicks on sign up. It looks like this. What I am trying to do is I want to disable that Create Button and It will be…
gunesevitan
  • 882
  • 10
  • 25
0
votes
0 answers

Accessing Node in GridPane in javaFX and Rectangle casting

I am working on a simple LiteBrite game using javaFX. Using a color picker, the user chooses a color and clocks on the GridPane which is a collection of Rectangles. Each click changes the color of that Rectangle to the one chosen by the user.…
0
votes
0 answers

gridpane returns null instead of button

I have a gridpane 10x10 filled with buttons. I'm using this function to get button in specific position private Node getNodeFromGridPane(GridPane gridPane, int col, int row) { for (Node node : gridPane.getChildren()) { Integer colOf =…
user3723497
  • 25
  • 1
  • 8
0
votes
1 answer

Align a label with textarea

How can I align the position of my "Description" label such that it corresponds in line with the "Enter description" text (Label - TextArea). These components are inside an gridPane and coded in javaFX ( so no Scene Builder tips can help me here…
zrilman
  • 81
  • 2
  • 8