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

GridPane Column Index not working as expected (JavaFX)

I have a problem getting the Column index working in JavaFX's GridPane. I am setting up the grid in two phases. The first method distributes a few buttons in a 6x6 grid: Button actualButton = new…
Zsolt Balla
  • 533
  • 2
  • 7
  • 16
0
votes
3 answers

JavaFX: GridPane, add() an integer as a label

Forgive the horribly generic GridPane name... it'll be changed as soon as I get some input on this. I'm adding items to a GridPane, it'll take a button, it'll take a label... it'll take pretty much anything but this int. int[] listObjA =…
0
votes
2 answers

Q: JavaFX8 resize gridpane columns dynamically

I have a gridpane with 2 rows and 2 cols. The user should be able to change the column width on the UI dynamically (best with the mouse on the divider). But I haven't found a way to do that. Can this be done using a gridpane or would I have to use a…
0
votes
1 answer

How to get column and row Index of each element in big GridPane(15x15)

I want to find the best solution for getting the column and row index of many elements in cells. For example I have GridPane(15x15). Each cell has Button component. I want to get index of row and column when mouseClicked event is indicated. I know…
Thulion
  • 97
  • 1
  • 11
0
votes
1 answer

Autoscale a String to the width of a screen

I'm trying to show a String on the screen, which is implemented in the Label named vraagLabel. I have placed the String in a Javafx.Gridpane and placed the GridPane within a Javafx.Borderpane. The issue I'm having is that when the String is too…
0
votes
0 answers

Fill GridPane cell

First of all I am a beginner in Java. I'm trying to create a Monopoly game in Java with JavaFX. I drew the board in a Gridpane. public class BordView extends GridPane { public BordView() { RowConstraints rowsEdge = new RowConstraints(); …
CaptainAargh
  • 7
  • 1
  • 4
0
votes
1 answer

JavaFX put Gridpane into a BorderPane

First of all I am a beginner in Java. I'm trying to create a Monopoly game in Java with JavaFX. I drew the board in a Gridpane. My question to you guys is how can I put that GridPane in the center of a BorderPane. Atm the gridpane takes the whole…
CaptainAargh
  • 7
  • 1
  • 4
0
votes
1 answer

I'm working with JavaFX. Essentially, I'm trying to make a button open a new stage, scene, and pane whenever you click on it.

I'm working on a GUi n JavaFX. I want to make my buttons in my first stage to be clickable and upon being clicked open up a new stage so that it displays another scene that contains another set of buttons with another set of images. package…
Jose Ivan
  • 3
  • 2
  • 4
0
votes
1 answer

getting the buttons in a gridPane and change their text using javaFx

Im trying to get all members of a gridPane (they are button) in my controller class , but i'm getting exception that you can see it below: Exception in Application start methodjava.lang.reflect.InvocationTargetException at…
mohamad ali gharat
  • 501
  • 1
  • 5
  • 10
0
votes
1 answer

Javafx create rectangles in a loop

I am learning Javafx and am having trouble getting my for loop to create a new rectangle on each iteration. When I run the program it creates one rectangle at the top left position and that is it. My goal is to create a grid of rectangles based on…
Solstice
  • 59
  • 2
  • 8
0
votes
1 answer

How to put a ColorPicker positioned by a gridPane on top of a Canvas

I got 3 Color pickers that are positioned using a grid pane, I'm also using a canvas. But The problem is, the canvas pushes the grid pane to the bottom of the screen. So if im using root.add(HeadColor, 0, 1); (to add the first colorpicker to the…
Peter
  • 73
  • 1
  • 9
0
votes
1 answer

JavaFX Editing Gridpane from FXML File

I wanted to add Labels to my gridpane via java; therefore, I used the following code: public class Controller { @FXML private Button addTeam; private GridPane teams; public void addTeam(ActionEvent e) throws Exception { …
Rhendz
  • 101
  • 1
  • 1
  • 9
0
votes
1 answer

Adding ListView (images) into GridPane?

Trying to display images in a thumbnail form to listview in a gridpane ObservableList imageFiles = FXCollections.observableArrayList(); List list = fileChooser.showOpenMultipleDialog(null); if(list != null){ for(File file…
Kesh
  • 75
  • 1
  • 1
  • 7
0
votes
0 answers

TitledPane loop only last one has content

I am building my fxml programmatically. Now I'm adding a titledpanes to my accordion and in those titledpane I have setContent to a gridpane that is defined in the loop. The result screen shows all titledpanes i've added. It shows the title of the…
0
votes
1 answer

Adding a GridPane to a GridPane

I am a beginner in using JavaFX and have to create an interactive Sudoku board for a final project. My plan was to add nine 3 by 3 GridPanes to a 3 by 3 GridPane (to make the nice looking board with outlined boxes) but can't seem to do it as I have.…
user5398363