File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JavaFX and the fly likes Problem setting Tile layout contents Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JavaFX
Bookmark "Problem setting Tile layout contents" Watch "Problem setting Tile layout contents" New topic
Author

Problem setting Tile layout contents

Trupti Mehta
Ranch Hand

Joined: Oct 08, 2000
Posts: 79


Hi,

I want to have a tile layout with 3 cols & 2 rows & dynamic content added to it.
This is my code :


How do I set mainScreenItems to Tile ? I actually want to add Buttons with this form.
And If I want to make this tile as a class then should I defien a customNode as a class something like :

class MyTile: Node {
setLayout ???
Add buttons ??
}

Kindly help me with this.

Regards,
Trupti (SCJP)
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

if you are using JavaFX script - please move to Java API based approach for JavaFX which is new in JavaFX 2.0. JavaFX Script isn't supported.

I dont know about the solution though - you might want to check the tutorial to use the layouts in JavaFX 2.0


Mohamed Sanaulla | My Blog
Trupti Mehta
Ranch Hand

Joined: Oct 08, 2000
Posts: 79

Mohamed Sanaulla wrote:if you are using JavaFX script - please move to Java API based approach for JavaFX which is new in JavaFX 2.0. JavaFX Script isn't supported.

I dont know about the solution though - you might want to check the tutorial to use the layouts in JavaFX 2.0


@Mohamed, I didn't get you clearly. Can you tell me what do you mean by this. I am a newbie in JavaFX.
I can't get how to use Java approach in JavaFx. I mean JavaFX Class doesn't have any constructor for me to add the init code in it. I should create JavaFX Class or Java class. How do I initialize components and add data to it. There should be some place to do this work.
Couldn't find any tutorial also that explains this all parts nicely. the tutorial avaialbel on Oracle site uses all scripting only - no such code like :
Title t = new Tile()
.....
...

BTW, is it better to use JavaFx2.0 or lower verison ?
Trupti Mehta
Ranch Hand

Joined: Oct 08, 2000
Posts: 79

@Mohamed, I got your point. I got to update my resources. My mistake I don't jave JavaFX 2.0 but 1.3.1. So things were not getting matched with the application and tutorials.
I will update and if face any problems will get back again.

Thanks
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

Anything below JavaFX 2.0 is better to be avoided, because JavaFX script is no longer supported (search in this forum for related posts). So please use JavaFX 2.0 version (Visit the official site)

So to get started you can read this tutorial. And there a lot of interesting posts shared here.

Update: was little late in posting this. Glad that you realized
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem setting Tile layout contents