GeeCON Prague 2014*
The moose likes JavaFX and the fly likes What is the best to achieve this sort of layouts ? (Newbie) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JavaFX
Bookmark "What is the best to achieve this sort of layouts ? (Newbie)" Watch "What is the best to achieve this sort of layouts ? (Newbie)" New topic
Author

What is the best to achieve this sort of layouts ? (Newbie)

Trupti Mehta
Ranch Hand

Joined: Oct 08, 2000
Posts: 79


Hi all,

I am a newbie for JavaFX. I want to develop a client which has tiles and on clicking a tile again other tiles appear. Finally a other layout for entry/view appears.

I belive for this I got to have different layout classes for each and call one by one in the main class. But am not able to get how to achive this. I read couple of turotials but couldn't get what I want to achieve.

What is the best possible way to achieve this? Please try to help me at the earliest. Any help is highly appreciated.


Regards,
Trupti (SCJP)
Gerhard Heil
Greenhorn

Joined: Dec 19, 2011
Posts: 6
Hello Trupti,

I am a JavaFx newbie also; it looks as if your application is a my JavaFx game (a kind of Sokoban game). I have a grid of 22 * 22 tiles, located at certain positions:

ImageView le_buildingView[][] = new ImageView[22][22];
for (nRow = 0; nRow < 22; nRow++) {
for (nCol = 0; nCol < 22; nCol++) {
le_buildingView[nCol][nRow] = new ImageView ();
le_buildingView[nCol][nRow].setX (nCol * 26 + 178);
le_buildingView[nCol][nRow].setY (nRow * 26 + 40);

leView.getChildren ().add (le_buildingView[nCol][nRow]);
 
GeeCON Prague 2014
 
subject: What is the best to achieve this sort of layouts ? (Newbie)