• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem setting Tile layout contents

 
Ranch Hand
Posts: 79
Android Java ME Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Trupti Mehta
Ranch Hand
Posts: 79
Android Java ME Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 79
Android Java ME Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@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
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic