0
FIX Columns Number
how can fix columns number in GridPane layout manager? is there any configurable property on "GridPane" to have the behaviour I look for?
7 Antworten
+ 1
About fixed colums:
https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/GridPane.html
If you look into the documentation you just add a node to a cell.
For example a button:
add(button, 0, 0)
I would define an integer for rowIndex which can increase.
int rowIndex = 0;
.add(button, 0, rowIndex);
rowIndex++;
column is fixed, rows increase.
Other methods you could use:
.setRowIndex() and .setColumnIndex()
About Layout:
As I mentioned you can put every node in a gridPane cell. So you could add a VBox or HBox or whatever you want. And inside the layout you add the content (text or shapes...).
+ 1
Sorry but I don't have access to your google drive account. But you can upload the picture in your feed and share the link here.
0
Hello Miss. ShahHosseinian
Can you share more information about your query? At the moment I am not sure what you want to do.
0
Okay.
I want to build a table with gridPane that each cell has own layout manager like HBox.
so the issue is my table size should be Yx3. this means that my table should cover the screen with this details: 3 column and there's no limit for rows num.
I don't know why nobody not understanding me. I am not okay with java fx bcz i started it just few days ago.finally tnx Denise Roßberg
0
Miss. ShahHosseinian
Now it clear for me. It was more a language barrier.
But I need to do some research because I'm not sure if every cell can have it's own layout manager.
0
Okay. tnx Denise Roßberg
but I think should see you this:
https://drive.google.com/file/d/154A-IuFBBLVu8_XoawwhXJ73-4F_oDHZ/view?usp=sharing
I want this table fit width screen!
0
I didn't consider this issue, yes u right