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

Using JavaFX: Is It Possible to Put A GridPane in an Alert Dialog Box?

I have an alert box that is populated with text and for formatting reasons I was wondering if I could somehow put a GridPane inside this Alert box so all the text is spaced out correctly. If it is not possible to do this with GridPane is there some…
Andrew
  • 159
  • 2
  • 11
1
vote
1 answer

javafx gridpane center align and justify all labels

The idea is to create a submission form that has many labels centered and justified for example: Label 1 is Customer Name and Label 2 is Product Name What I am trying to do is horizontally center align all the labels that's very easy but At the same…
Takasur
  • 452
  • 7
  • 19
1
vote
0 answers

JavaFX media player fit to GridPane

Hi I have this code for playing video inside JavaFX GridPane. The video is playing perfect, but it is not fit inside GridPane. So how to make it happen? @FXML private GridPane boxView; private MediaPlayer player; private MediaView view; public void…
boycod3
  • 5,033
  • 11
  • 58
  • 87
1
vote
1 answer

How can I create a GridPane with 2 rows and 3 columns programatically in JavaFx?

I am trying to create a grid pane with 2 rows and 3 columns and I want to insert some text in each part programatically . Here is what I've done but I keep getting errors . GridPane gp = new GridPane(); RowConstraints row0 = new…
Danial Kosarifa
  • 1,044
  • 4
  • 18
  • 51
1
vote
1 answer

JavaFx Canvas not showing up in GridPane despite being in children/list/backingList

Basically what the title says. I did notice that it didn't show up in childSet/map/table like the MenuBar and Text did. What could I be doing wrong? I have to add more details for some reason? All I'm trying to do is get the blue rectangle to show…
Al G Johnston
  • 129
  • 2
  • 10
1
vote
0 answers

How to remove previous elements(button) of GridPane and add another elements to it in javaFx?

In javaFx, I have Category GridPane in which i loaded buttons to it dynamically at the time of Initialization. See Image contains one Category GridPane and another Items GridPane Now, when i click on any category button, for example 'category 2'…
1
vote
0 answers

No visible Gridlines

I have done a code sample of what I need but I get invisible Grid Lines. Not sure why it's not working, I've tried different settings but no luck, here is the code. Sorry for the mess in the code: FXMLdocument.fxml
user2909180
  • 203
  • 3
  • 11
1
vote
1 answer

JavaFX, can't get GridPane to fit in the center of BorderPane

I'm working on a sudoku application but I'm having an issue which hinders my advancement. What I'm trying to do is to make this sudoku-board that I have created with loops, which adds a Label into a StackPane and that StackPane goes into it's…
Tolga
  • 13
  • 1
  • 3
1
vote
2 answers

Getting a Boolean value JAVAFX

I have a group of nodes within a GridPane and have some listeners adding and removing those nodes from the GridPane. I was wondering if there is a way for me to create a get method(Boolean) or such to test if the nodes are currently in the GridPane…
dan6657
  • 117
  • 2
  • 11
1
vote
1 answer

Javafx GridPane child alignment

I'd first like to say that I won't include any of my code, since the relevant code is widespread along many functions and files. I'm only asking to see if I did something blatantly wrong, otherwise I won't tire you with endless lines of code. I'm…
Sotiris
  • 53
  • 11
1
vote
0 answers

JavaFX GridPane ColumnConstraints percent width query

So if I have a GridPane in JavaFX and wish one column to use a higher percentage of width compared with two other columns, I could for example set col1 to be 50%, col2 and col3 to be 25%. This works fine, however, I don't want col2 and col3 to have…
Tranquility
  • 3,061
  • 5
  • 23
  • 37
1
vote
1 answer

JavaFX, moving nodes in a GridPane with arrow keys

I am struggling with a maze-like game. I am trying to move a "player"-node around in a GridPane using the arrow keys. This is my event handler: public class KeyListener implements EventHandler { public KeyListener(Player player, int prevX, int…
user3173015
1
vote
0 answers

Arrarylist to hbox to gridpane

Thank You For Taking The Time To Help Me. I Am Working On Making A Game Board And I Would Like to Have My ArrayList Of Images Added Into an hbox and then Into a gridpane or tilepane which ever you would think is better. I think tilepane. I am trying…
1
vote
1 answer

GridPane 9x9 with TextField for Sudoku

I'm trying to use a GridPane for a Sudoku 9x9 using FXML. I'm fairly new in this field so I wanted to ask you guys before proceeding. I've created a GridPane 9x9 and for now I'm using TextField in each node to display numbers and enabling the user…
ElloU
  • 67
  • 1
  • 10
1
vote
1 answer

Problems with calling a Method (Minesweeper)

I am facing right now a problem where I think that my main is executing a method over and over again, instead of one time. Its better if I explain it according to an example. I already were able to program a Minesweeper game. But i wrote it all in…
dahood
  • 27
  • 6