All Questions
33 questions
12
votes
3
answers
33k
views
How do I get buttons to fill a javafx gridpane?
Java Swing has GridLayout, which allows you to specify a size for an array of widgets such as 3X4. The widgets then fill the panel they occupy. How do you get a similar effect in JavaFX?
1
vote
1
answer
1k
views
JavaFX : Rotated TitledPane does not fill the layout
I'm making a desktop application and was trying to create a vertical TitledPane to represent a "vertical collapsible toolbar".
I have done some researches on how to do it and was able to create my ...
3
votes
3
answers
4k
views
JavaFX evenly split children
How can I acheive an evenly split UI, as the Player boxes demonstrate in the following example:
I would model it as an HBox with 2 evenly sized VBoxes, but I can't get them to stretch to the same ...
0
votes
1
answer
2k
views
JavaFX custom layout of nodes [duplicate]
I am developing an application for which it is necessary to layout nodes besides each other (or on top of each other etc.). However, this layout is only an initial placement and the user is able to ...
0
votes
1
answer
427
views
Javafx gridpane layout allignment
I have a small question.
I am trying to create a good GUI (which you can resize) with JavaFX 2.0 but I have a small problem.
I am using a gridpane but when i put multiple buttons in it and when I ...
1
vote
1
answer
3k
views
Reference and Guidelines for Dynamic Layout using JavaFX
I am using FXML via Scene Builder to establish some JavaFX scenes and formatting templates. Having scanned the web and Oracle tutorials, I still find determining the 'rules' around how layouts size/...
2
votes
1
answer
201
views
JavaFX layout: all in Grid vs Separator for each cell
I am new to UI design and JavaFX, and due to the problem I am faced with I wonder which of these layouts will be easier to work with:
The first option is one element/component per cell in the grid:
...
9
votes
4
answers
14k
views
Get the number of rows in a JavaFX GridPane?
I initialized a GridPane through SceneBuilder and inside the controller I want to conditionally add a row to the GridPane. I do not want to store an int for how many rows I initialized, I want to be ...
0
votes
1
answer
1k
views
JavaFX Menu Flow
I have an application with two menu bars (application menus and administration menus) on the top row and a search box in between them. The first menu bar is left justified with the search box ...
0
votes
1
answer
923
views
JavaFX: Customize the layout of composite standard controls like Accordion or TreeView
While exploring the basic concepts of JavaFX, the following question arose:
Is there a way to customize the layout of composite controls (such as TreeView or Accordion)?
For example, to achieve a ...
8
votes
3
answers
5k
views
JavaFX 2 Creating a Custom Pane
I have seen several custom JavaFX control tutorials around, but no tutorials on how to create a custom pane layout. I ask because I am trying to create a flowing two-sided (think form-like (name,value)...
0
votes
1
answer
382
views
locate an hbox to the center of a cell in a javafx2 gridpane
I am trying everything, but this hbox does not want to move down the cell,
here is a screenshot
The top left hbox located inside the gridbox cell 0 column 0 defined in the code below refuses to move ...
1
vote
1
answer
6k
views
JavaFX Grid Pane and content size
I've been trying to get a GridPane's content to behave regarding auto-size but I'm relatively new to JavaFX, so I've not had any success. Basically, each column is what appears to me to be a ...
1
vote
0
answers
786
views
Resizing of graphic node in TitledPane's header
I think JavaFX's TitledPane shows a wrong resizing behavior when using a graphic node in its header. For when I add a BorderPane instance as a graphic (using Label#setGraphic) to a label and when I ...
3
votes
1
answer
970
views
java fx: Where is the constraint property saved when using GridPane.setRowIndex(...);
I was used to Swing and I'm now beginning with FX.
I came across a question which I couldn't find a answer reading the "Working With Layouts in JavaFX " Guide from Oracle and also doing some research ...
2
votes
1
answer
3k
views
Automatic resizing of LineChart fails if embedded in a pane
The following program fails to resize the line chart horizontally when embedded in a Pane (or borderpane of anchorpane for the matter)
If the line chart is directly parented to the VBox instead, then ...
7
votes
1
answer
5k
views
Can I force JavaFX's GridPane to distribute space evenly?
I'm facing a bit of weird layout behaviour when using GirdPanes in JavaFX 2. While it usually seems to spread horizontal space evenly between multiple fields, it doesn't do so in some other cases. ...
2
votes
1
answer
2k
views
Combine javafx 2 ListView and GridPane features
My target is to display an abbreviation list with two entries per line: the abbreviation and the corresponding long version. For a nice layout I used a GridPane because of the vertical alignment over ...
6
votes
3
answers
8k
views
Get width / height of a GridPane column / row?
While it's obvious how to set the width/height of a column/row in a GridPane, how can I actually query these values?
4
votes
1
answer
5k
views
JavaFX VBox and HBox layouts
I'm working on a JavaFX application which has a layout generated from an external data structure, composed of
displaying components that know their own aspect ratios (height as a dependent of width)
...
1
vote
2
answers
1k
views
Determine maximum dimensions a Canvas could grow to?
I am using a BorderPane, where the right area is unused. In the center area I have a HBox with a Canvas and another control e.g. a Button. I want the Canvas to have the same width and height with a ...
42
votes
6
answers
37k
views
GroupBox / TitledBorder in JavaFX 2?
Is there something like a GroupBox or TitledBorder available on JavaFX 2?
Thanks for any hint :-)
5
votes
1
answer
1k
views
Controls/Layouts of JavaFX allows to use the mouse to resize?
When I say "use the mouse to resize" I mean put the pointer at the edge, click and drag and it will be resize.
Is there any JavaFX control or layout let be do that by default?
Thanks!
1
vote
2
answers
3k
views
JavaFX 2 change layout dynamically at runtime?
Swing had LayoutManager's separate from the containers. So far as I can tell, JavaFX doesn't do that.
I have a complex structure of nodes that I want the user to be able to toggle between several ...
4
votes
1
answer
897
views
Absolute layout- centering of buttons
I'm working on a project, and I need to make two buttons absolutly centered on the scene.
I haven't found any built in pane option to do the work, so I had to use alot of binding.
The code for that is ...
17
votes
2
answers
11k
views
TableView has more columns than specified
When using a TableView in JavaFX 2, there seems to be magically one column added instead of resizing the existing ones. Please see the following screenshot.
What I would expect/want: Both column ...
3
votes
1
answer
3k
views
Moving a component out of ScrollPane - JavaFX
I ask for your help because I have a problem with a ScrollPane in JavaFX.
I added a Group into the scrollPane, added the scrollpane to the Scene and finally put it into a JFXPanel because I use it in ...
8
votes
1
answer
8k
views
JavaFx 2 create TableView with single column
I am trying to create a table with a single column using the following code :
TableView<String> table = new TableView<String>();
table.getColumns().clear();
table.getColumns().add(new ...
2
votes
1
answer
3k
views
javafx 2 gridpane rows overlap when using percentHeight
I am trying to layout my screen in JavaFX and have trouble using GridPane.
I have 2 rows - one of them is set to have percentHeight of 80 and the other of 20
but what I'm seeing is that one row is ...
1
vote
1
answer
1k
views
JavaFX FXML not working same way as in SceneBuilder (sceencast)
I've got this FXML that is working perfectly in SceneBuilder Preview and acts completely different on NetBeans JavaFX Sample Application (so there is nothing extra that could break it's behaviour). (...
7
votes
2
answers
4k
views
When adding a second item to my stackpane, the first item loses its Event/MouseOn. Why? How can I fix? JavaFX
I have a stackpane. When I add a second item to my stack pane, both show up, but I can't click on my first item anymore. It becomes 'unclickable'.
what ever I defined in my .setonmouse does not work. ...
2
votes
3
answers
9k
views
JavaFX 2.0: Flowpane should automaticly resize when parental element does
In JavaFX 1.x, where I've used the FX-Script to setup the Scene, I had the bind keyword:
Dynamic/instant resize in JavaFX
How can I have the same behavior in 2.0?
0
votes
1
answer
4k
views
Binding BorderPane and Frame Height and Width
I am using JavaFX 2 in Netbeans. How do I get the width and height of an element to adjust when the Frame is resized? Here is my layout:
Stage stage = new Stage();
stage.setTitle("Hello World");
...