Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to define a Toggle Button with an Image in fxml

943427Jun 28 2012 — edited Jun 29 2012
I'm trying to define a Toggle Button with an Image (icon) in fxml. It's possible to do that?

I know how to do it in .java
Image image = new Image(getClass().getResourceAsStream("icon.png"));
ToggleButton tb = new ToggleButton ("", new ImageView(image));
But i'm not able to convert it to fxml.

Thanks

Edited by: UnaVezFuiPez on 29-jun-2012 3:35
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2012
Added on Jun 28 2012
5 comments
874 views