This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Adapt samples to show them in preview and running as Applets | ||
---|---|---|---|
Product: | usersguide | Reporter: | Alexandr Scherbatiy <sunflower> |
Component: | JavaFX | Assignee: | Michal Skvor <misk> |
Status: | VERIFIED WORKSFORME | ||
Severity: | blocker | ||
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | ColorWheel example and Preview |
Description
Alexandr Scherbatiy
2008-04-23 12:15:49 UTC
The problem is not in samples but in preview. Imagine ordinary script developer who is trying to write something in the script that he must put visible object somewhere at the end to see product of his work and maybe he won't. Hacks like return something at the end are ridiculous and force developer to make ugly code. What if user wants to return two frames and not one to create MDA application? Even when I place my object as last it does not automatically means that the frame or other visible object will be shown in the preview window. And last but not least. Application does not work at all. Preview and run does not show window and I can't set title in Application. The main problem is in JavaFX Script compiler. See JFXC-1121 http://openjfx.java.sun.com/jira/browse/JFXC-1121 The problem is that compiler returns only last statement from file. So the suggestion is to move a Frame declaration at the end of file for samples. The following code does not look very ugly: ------------------------------------- // code Frame{ } ------------------------------------- If you have Applet examples that uses javafx.ui library then they can be converted to Reprise applets using javafx.gui.Application class It does not solve this problem for all demos. Try for example ColorWheel. Move Frame from beginning to the end. It
should be working but it does not.
Even when you do this:
// code
// last things in file
var f = Frame {};
return f; // <-- this is the last line of fx file
> If you have Applet examples that uses javafx.ui library
> then they can be converted to Reprise applets using javafx.gui.Application class
All demos are rewritten to Reprise so they utilizing javafx.gui classes. Changing javafx.gui.Frame to
javafx.gui.Application causes no visible application ( either in preview or run ) at all.
The ColorWheel is shown in preview for me. See the attached screen-shot. Ok. Do not use javafx.gui.Application class. It is designed only for applet support now. Created attachment 60683 [details]
ColorWheel example and Preview
Preview is bale to show frames that are not at the end of file now. verified |