JavaFx 2.0 GUI within the Netbeans Platform Application - java

Is there any way to integrate JavaFx 2.0 GUI within the Netbeans Platform Application? I've tried searching the topic but did not come across what I was looking for.

I am not very familiar with Netbeans RCP but it is swing based so you can embed your Java FX 2 components the same way you would embed them in a Swing application: use JFXPanels for the FX2/Swing bridge and then embed those panels in RCP the same way you would add a Swing component.
I have also seen
this tutorial but have not tried it
and this related question on SO.

Related

Browser for Java Swing Jinternalframe

I need to integrate a browser in a JInternalFrame. I tried a lot of different ideas:
jcef: It is based on heavyweight components an so don't work with swing
jxBrowser: is only compatible to java 8
swt Browser: works in a JFrame but not JInternalFrame, Problem is described in this question
Does someone has another Idea how to integrate a browser to swing? It should be able to show Pages, which shows webGL and compatible with java 9 and 10.
I already saw some similar questions on SO, but those are 10 years and older and don't fit for my purpose
I found a solution and it worked with The DJ Project. It contains a library, that uses the swt browser and has a API for Java Swing applications.

how to use ArcGis in javafx

i am using ArcGIS Library for a geospatial project. the sample codes available in their website was fully in java Swing. i need to do path animation in it using javaFX. is it possible.? if yes, can any one suggest me a sample code to create a map.?
Sample code for creating a map in Swing
I don't think you can pull this off using JavaFX, since JMap extends JComponent and is a class provided by the ArcGIS. Unless, they release a version which is supporting JavaFX, things are not very good.
The least you can do is to embed this JMap into a JavaFX application using SwingNode. An example on how to achieve this can be found here.
I am not sure what you want to achieve, when you say "path animation in it", but if it has something that can be achieved without using the internal components of JMap, you can do it !
JMap is a Swing component. JavaFX 1 was built on Swing and supported wrapping a Swing component. JavaFX 2 does not use Swing and does not support wrapping a Swing component. It is anticipated that the upcoming JavaFX 8 will support using Swing components in a JavaFX application.
UPDATE: ArcGIS Runtime is getting support for JavaFX! See http://blogs.esri.com/esri/arcgis/2014/09/17/arcgis-runtime-plays-at-10-2-4/ for details.
You have some options:
Go back to JavaFX 1 (not a good idea IMO)
Turn it around and use JavaFX components in a Swing application (see http://docs.oracle.com/javafx/2/swing/swing-fx-interoperability.htm)
Wait for Java 8, or go get the developer preview of Java 8.
Wait for ArcGIS Runtime 10.2.4 (to be released any day now), which will have beta support for JavaFX.
Sources:
How to wrap a swing component in a javaFX 2.0 application
Class SwingNode (JavaFX 8)
Maybe a bit late but... ArcGIS Runtime for Java's latest beta (Quartz) offers much more JavaFX support.
https://developers.arcgis.com/java/beta/guide/release-notes-java.htm

Using JavaFX Chart in Swing Application

I have a traditional Java swing application (extends JFrame and has a main class) that uses JFreeCharts for some charting functionality. I have recently seen JavaFX and think these charts look alot refresher and will give my users a better experience. I wish to embed a JavaFX chart scene into a jInternalFrame (which in turn is called from my jDesktopPane).
I have followed a simple tutorial on how to create both a javafx application and a javafx chart but I am stuck on to how I get the scene inside my existing code. One example I have been through shows me how to achieve this but means converting my project to a javafx one which extends "application" class.
How can I achieve what I want? Is it not possible to keep my existing JFrame as the top level class and simply add a JFXPanel to my jinternalframe.
Any help would be great, please note I have been through some tutorials and they require me to convert my project to javafx - I simply want a javafx scene in my existing swing app.
Many thanks,
You don't need to convert your Swing application to a JavaFX application. You can place a JavaFX Chart in a JFXPanel which may be placed in a Swing component. The javadoc I linked includes sample code for embedding a JavaFX node in a Swing application.
Review the official JavaFX for Swing Developers tutorial trail from Oracle.
Also look at the Embedding JavaFX in Swing sample of SwingInterop for embedding a chart in a Swing application. The sample is provided by Oracle under the BSD open source license so that you can use it in your application.
Despite all this, my advice, unless it is a large, existing Swing code base that you just want to use a couple of JavaFX features in, is to write your application as a pure JavaFX application rather than a mixed Swing/JavaFX application.

JavaFX for Presentation Layer in Standalone Desktop App

We are going to create a java standalone Desktop application. We are searching for the best solution for the presentation layer. I saw javaFX and really liked it, but I am a bit confused. Can it be used in standalone Desktop applications?
Can I use javaFX in my standalone Desktop app and also use css to style the Ui?
It is perfectly possible to use JavaFX in a standalone Desktop app and apply CSS styling to it.
In JavaFX's lingo, this is know as a "Standalone" or "Self-Contained" deployment.
You can even integrate it with Swing or SWT, if the need arises. Note, though, that it's not possible the other way round.

Desktop application on Java

I want to create a desktop application, but do not want to use SWING. I have heard about of SWT as alternative to SWING. Any another solutions exists? And what do you recommend to use?
You can build an Eclipse Rich Client Platform (RCP), using SWT and JFace.
What about just AWT in java.util.awt and subpackages? You can use the older equivalents of Swing's components.

Categories

Resources