This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

create custom component in javaFX

 
Liviu Dorneanu
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there!

I'm new at JavaFX, i'm just starting to learn it and I runned into a problem.
I need to create a custom component in JavaFX (using fxml).
Long story short: I have a application for witch I will have a "part" that will be common for most of the "scenes" ("pages"). This part should contain a menu, a logo, some labels, 2-3 buttons, etc., and I should be able to populate some of the labels based on some data. This is why I thought that I better create a custom component and use it on all my pages (scenes). The problem is that I did not found information about creating custom components (I don't need a custom control, a button, label or something like this..., I need a custom component) over the internet.
Could you please tell me if this is possible? I mean is these a way to create custom components using JavaFX?
Could this component act as a controller (set properties, get values ... )?
Can you help me with some documentation?

Thank you in advance!
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please BeForthrightWhenCrossPostingToOtherSites
http://forums.codeguru.com/showthread.php?p=2069190
 
Liviu Dorneanu
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep ... sorry about that ... I did not know the "Be Forthright When Cross Posting To Other Sites" rule ... I have posted this question a few days ago on only one forum, and because I did not got an answer ... I thought it would be better to post on a few more.

I still don't have an answer!

Thank you!
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't really need a custom component (and component is an old AWT concept anyways; FX doesn't have components). All you need is a method that returns any suitable Parent subclass populated with the requisite Nodes.

Could this component act as a controller (set properties, get values ... )?

The real question is not could it, but should it? And only you have sufficient knowledge of the design to answer that.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic