Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 122502 - [Weather App] The app run in a separate window when enable preview for WeatherApp.fx file
[Weather App] The app run in a separate window when enable preview for Weath...
Product: javafx
Classification: Unclassified
Component: Unsupported
All All
: P1 (vote)
Assigned To: Liu Yong
Depends on:
  Show dependency treegraph
Reported: 2007-11-21 13:29 UTC by Alexandr Scherbatiy
Modified: 2009-01-20 10:53 UTC (History)
2 users (show)

See Also:
Issue Type: TASK


Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2007-11-21 13:29:07 UTC
Steps to reproduce:

- Create a JavaFX Weather sample
- Build the sample
- Open weatherfx.WeatherApp.fx file
- Enable the preview
  The sample run in separate window not in the preview
  ( see issue 103988 )

 The WeatherApp.fx file could be rewritten to avoid this issue.
Comment 1 Adam Sotona 2007-12-11 18:53:29 UTC
This is as designed, weather app is opened in a separate frame.
Try preview of weather.fx - it is running in a canvas.
Comment 2 Martin Ryzl 2007-12-11 19:10:31 UTC
I think breh has got a fix
Comment 3 Martin Brehovsky 2007-12-11 19:26:24 UTC
All what needs to be done is to add this line of code at the end of WeatherApp.fx file:

return f;

This makes sure the module gets the frame rendering the app, can remove the frame and show the content of the window
inside the editor.
Comment 4 Adam Sotona 2007-12-12 10:42:39 UTC
LOL - I will implement this workaround into our sample.

But this is tutorial so I am reassigning this as P1 issue for javafx code.

Users will not learn our internal preview implementation hacks to code in JavaFX - this is ridiculous !!!
Comment 5 Adam Sotona 2007-12-12 10:52:04 UTC
implemented workaround for WeatherApp sample in trunk:

Checking in samples/weather2/resources/WeatherFX/src/weatherfx/WeatherApp.fx;
/cvs/javafx/samples/weather2/resources/WeatherFX/src/weatherfx/WeatherApp.fx,v  <--  WeatherApp.fx
new revision: 1.3; previous revision: 1.2
Comment 6 Alexei Mokeev 2007-12-12 10:52:43 UTC
Thanks. It's the specific of the interpreter but not the plugin :)
IDE can't block all cases when user's application wants to create a new window.
But I'm setting this as P1 task to check when we will have preview on top of the compiler.

Comment 7 Adam Sotona 2009-01-06 14:02:37 UTC
The workaround works sot this issue is closing as works for me.
Feel free to create a high level requirement on preview to reuse an API for previewing but such API does not exist.
Comment 8 Alexandr Scherbatiy 2009-01-20 10:53:51 UTC
Verified in JavaFX_NB_Plugin_Franca_NB_65_fixes_cont: #48 20-Jan-2009 10:22:21

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo