JavaFX in a CDC application

Hello,
I am trying to embed a JavaFX scene in swing JComponent as shown below:
import java.awt.;
import javax.swing.;
import org.jfxtras.scene.SceneToJComponent;
public class Main extends JFrame {
public static JTextField tf = new JTextField("JavaFX for SWING");
public Main() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("JavaFX in SWING Test");
Container container = getContentPane();
container.setLayout(new BorderLayout());
String sceneClass = "cdcapplication13.MyScene";
JComponent myScene = SceneToJComponent.loadScene(sceneClass);
JLabel label = new JLabel(" Below is a JavaFX Animation: ");
container.add(label, BorderLayout.NORTH);
container.add(myScene, BorderLayout.CENTER);
JPanel p = new JPanel();
p.setLayout(new FlowLayout());
tf.setColumns(28);
p.add(tf);
p.add(new JButton("SWING Button"));
container.add(p, BorderLayout.SOUTH);
pack();
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(
new Runnable() {
public void run() {
new Main().setVisible(true);
In the above cdcapplication13.MyScene is my JavaFX scene class. The above worksfine is a desktop application. However, when trying to do the same on a CDC application with Emulator platform - CDC Java(TM) Platform Micro Edition SDK 3.0, Device - SunVgaAGUIPhone1 and Device Profile - PBP-1.1, I get the following exception when running to app:
nsicom-run:
ODT agent stopped.
java.lang.SecurityException: no manifiest section for signature file entry javax/crypto/KeyGeneratorSpi.class
at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:278)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:190)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:259)
at java.util.jar.JarVerifier.update(JarVerifier.java:214)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:270)
at java.util.jar.JarFile.getInputStream(JarFile.java:332)
at sun.misc.Launcher$AppClassLoader.defineClassPrivate(Launcher.java:544)
at sun.misc.Launcher$AppClassLoader.access$500(Launcher.java:344)
at sun.misc.Launcher$4.run(Launcher.java:565)
at java.security.AccessController.doPrivileged(AccessController.java:351)
at java.security.AccessController.doPrivileged(AccessController.java:320)
at sun.misc.Launcher$AppClassLoader.doClassFind(Launcher.java:559)
at sun.misc.Launcher$AppClassLoader.findClass(Launcher.java:607)
at java.lang.ClassLoader.loadClass(ClassLoader.java:349)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:420)
at java.lang.ClassLoader.loadClass(ClassLoader.java:338)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:603)
at java.lang.ClassLoader.loadClass(ClassLoader.java:291)
at com.sun.cdc.odt.CdcAppManager.runMain(CdcAppManager.java:168)
at com.sun.cdc.odt.CdcAppManager.access$100(CdcAppManager.java:44)
at com.sun.cdc.odt.CdcAppManager$1.run(CdcAppManager.java:90)
at java.lang.Thread.startup(Thread.java:782)
Can anyone please tell me how to fix this issue?
Thanks!

Hi,
I want to create a CSV file and email it as an
attachment to a specified email address once the user
presses Submit in my application. This is developed
for Sony Ericsson P990i. Can anyone help me with
this?
Thanks in advanceI just tried this yesterday, and got to the point where I realized that the Foundation 1.0 JCL, doesn't support what I need from JavaMail 1.4x. Perhaps the alternative, is to read the RFCs, and write a native client, or maybe FTP the file(s)?
Jeff

Similar Messages

  • CDC Application with JavaFX

    Hello,
    I am trying to embed a JavaFX scene in swing JComponent as shown below:
    import java.awt.*;
    import javax.swing.*;
    import org.jfxtras.scene.SceneToJComponent;
    public class Main extends JFrame {
    public static JTextField tf = new JTextField("JavaFX for SWING");
    public Main() {
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("JavaFX in SWING Test");
    Container container = getContentPane();
    container.setLayout(new BorderLayout());
    String sceneClass = "cdcapplication13.MyScene";
    JComponent myScene = SceneToJComponent.loadScene(sceneClass);
    JLabel label = new JLabel(" Below is a JavaFX Animation: ");
    container.add(label, BorderLayout.NORTH);
    container.add(myScene, BorderLayout.CENTER);
    JPanel p = new JPanel();
    p.setLayout(new FlowLayout());
    tf.setColumns(28);
    p.add(tf);
    p.add(new JButton("SWING Button"));
    container.add(p, BorderLayout.SOUTH);
    pack();
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(
    new Runnable() {
    public void run() {
    new Main().setVisible(true);
    In the above cdcapplication13.MyScene is my JavaFX scene class. The above worksfine is a desktop application. However, when trying to do the same on a CDC application with Emulator platform - CDC Java(TM) Platform Micro Edition SDK 3.0, Device - SunVgaAGUIPhone1 and Device Profile - PBP-1.1, I get the following exception when running to app:
    nsicom-run:
    ODT agent stopped.
    java.lang.SecurityException: no manifiest section for signature file entry javax/crypto/KeyGeneratorSpi.class
    at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:278)
    at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:190)
    at java.util.jar.JarVerifier.processEntry(JarVerifier.java:259)
    at java.util.jar.JarVerifier.update(JarVerifier.java:214)
    at java.util.jar.JarFile.initializeVerifier(JarFile.java:270)
    at java.util.jar.JarFile.getInputStream(JarFile.java:332)
    at sun.misc.Launcher$AppClassLoader.defineClassPrivate(Launcher.java:544)
    at sun.misc.Launcher$AppClassLoader.access$500(Launcher.java:344)
    at sun.misc.Launcher$4.run(Launcher.java:565)
    at java.security.AccessController.doPrivileged(AccessController.java:351)
    at java.security.AccessController.doPrivileged(AccessController.java:320)
    at sun.misc.Launcher$AppClassLoader.doClassFind(Launcher.java:559)
    at sun.misc.Launcher$AppClassLoader.findClass(Launcher.java:607)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:349)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:420)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:338)
    at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:603)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:291)
    at com.sun.cdc.odt.CdcAppManager.runMain(CdcAppManager.java:168)
    at com.sun.cdc.odt.CdcAppManager.access$100(CdcAppManager.java:44)
    at com.sun.cdc.odt.CdcAppManager$1.run(CdcAppManager.java:90)
    at java.lang.Thread.startup(Thread.java:782)
    Can anyone please tell me how to fix this issue?
    Thanks!

    Welcome to the forum. Please don't post in threads that are long dead and don't hijack other threads. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    I'm locking this thread now.

  • Problem with JavaFX 8 Self-contained Application !

    Hello everybody,
    I generate a JavaFX 8 Self-Contained Application for Windows (.msi).
    Eclipse 4.3.1 (Kepler)
    JDK 8 B116 (EA - i don't use the lasts beta versions (B117 and B118) because there is a bug during installation for Windows XP)
    Scene builder 2.0 (EA)
    When i install this application (exec .msi) on my PC (Windows XP SP3 - JDK 7 and 8 installed), no problem.
    So i install this application on 2 others PC (PC without JDK 8 installed).
    The first PC on Windows XP SP3 (JDK 5 and 6 installed) : display problem - the font is very big as if I had made a zoom on the contents of the window !
    The second PC on Windows 7 PRO (JDK 7 installed) - when in launch the application by the system menu, i have two strange problems
    1/ when i move my mouse on the content of the window, this content becomes black !
    2/ it's necessary to resize the window (full screen) and to come back to the original size to obtain a correct display !
    I don't know where is the problem(s) ?
    is it linked to JDK 8 (BETA version) embedded ?
    If you have a idea do not hesitate !
    Thanks you in advance
    IBACK

    I only use external FW HDDs for my video work; my Capture Scratch files are on external drives and I export finished movies to external drives. My project files are on my system drive, this is the best way to work, I have never had any problems I could associate with this configuration
    I am assuming you've gone thru your project, your timeline and everything is kosher. Is everything fully rendered? Have you mixed down your audio? Have you tried exporting just the last 30 seconds of one of the projects to see if you can replicate the problem?

  • CDC Application with Swing

    Hello,
    I am working on a CDC application, with Emulator platform - CDC Java(TM) Platform Micro Edition SDK 3.0, Device - SunVgaAGUIPhone1 and Device Profile - PBP-1.1. The following (Hello World app) works fine for me:
    import java.awt.*;
    public class Main extends Frame {
    public Main () {
    initComponents();
    private void initComponents() {
    pack();
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new Main().setVisible(true);
    public void paint(Graphics g) {
    g.drawString("Hello, World!", 80, 50);
    My understanding is that CDC with AGUI supports swing. However, when I change the above code to the following, it does not work:
    import java.awt.*;
    import javax.swing.*;
    public class Main extends JFrame {
    public Main () {
    initComponents();
    private void initComponents() {
    pack();
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new Main().setVisible(true);
    public void paint(Graphics g) {
    g.drawString("Hello, World!", 80, 50);
    Can anyone tell me what am I missing? Or is this even possible?
    Thanks!

    Welcome to the forum. Please don't post in threads that are long dead and don't hijack other threads. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    I'm locking this thread now.

  • ?Is it possible to create a javafx class without extending Application class ? If yes, how

    Is it possible to create a javafx class without extending Application class ? If yes, how ?

      There is no  such thing as a javafx  class.  It is a regular  java class.  The Aapplication class is  the entry
    point  for JavaFX application.  You have to extend the Application class to create Javafx  application .

  • Im new. How Do i integrate javaFX in my Existing Application of struts 2

    Hi there,
    I'm new to javaFX, so dont get mad at me with the question's im asking.
    I have a Existing application of struts 2 and now i want to add some enriched features in it using javaFX. So how do i start.
    Basically what is javaFX? Its all Client side rite, so do i have to do it in .jsp or how.
    How do i integrate in my existing application.
    Any link or material would be of great help
    Prateek Agarwal.

    .fx files are compiled to .class files, ie. regular Java code using a special runtime.
    These class files are then packaged to a .jar file and used like a regular applet. Look at the javafx.org site for samples, how they are integrated to the Web page.
    All you have to do is to include the special JavaScript code provided by Sun which will create the applet/object code for you, depending on the browser used by the users.

  • New poll: Migrating JavaFX 1.x Production Applications

    If you have developed a JavaFX 1.x application and deployed it in production mode, it is time for you to start thinking about your migration options. Oracle is interested to know whether you have made sizable investments in JavaFX 1.x, so we can discuss your options with regards to migrating your application(s) to JavaFX 2.0.
    Please vote for the option that better fits your particular scenario in the poll, and contact javafx4you [at] sun [dot] com if you want to set up a discussion with us.
    Thanks,
    The JavaFX Product Team
    Edited by: javafx4you on Dec 21, 2011 10:35 AM

    Hi,
    Assuming the version of essbase is the same,
    1. Export data (level zero or all) from each app
    2. Create apps and databases in new environment
    3. Replace otl file, calc scripts etc with ones from old environment
    4. Import data
    5. Calc (if level zero data loaded)
    Ensure cache settings are the same on each db compared with the old environment.
    Thanks,
    Nathan

  • JavaFX embedded into Swing applications - success

    For those of you who are trying to use JavaFX within Swing here is an easy way to do it.
    Rectangle rect = new Rectangle();
    rect.$width.setAsDouble(100);
    rect.$height.setAsDouble(100);
    SGNode sgNode = rect.getSGRectangle();
    JSGPanel sgPanel = new JSGPanel();
    sgPanel.setScene(sgNode);
    JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BorderLayout());
    mainPanel.add(sgPanel, BorderLayout.CENTER);The same approach also works for custom nodes you have developed yourself. Note that you can change values of public variables declared in your JavaFX node with e.g. rect.$width.setAsDouble(200.0); When you do this be sure you run the value update code from event dispatch thread.
    I guess this makes JavaFX more usable for us who develop desktop applications with Swing and can't start rewriting everything in JavaFX :-)
    Edited by: aless on Dec 12, 2008 6:51 AM

    aless,
    can you provide concrete example of your approach. im new to fx really unable to follow your example. I tried to follow pmd's explanation but im unable to load the fx classes by the same class loader. Im getting the following error in the runtime
    Thanks and appreciate your help.
    Sri
    Exception in thread "main" java.lang.ClassNotFoundException: test.TestFx
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
    at test.TestJavaFX.main(TestJavaFX.java:27)
    Profiler Agent: Initializing...
    package test;
    import com.sun.scenario.scenegraph.JSGPanel;
    import com.sun.scenario.scenegraph.SGNode;
    public class TestJavaFX {
    public static void main(String[] args) throws Exception {
    Class c = Class.forName("test.TestFx");
    TestFxInterface test = (TestFxInterface) c.newInstance();
    SGNode sgNode = test.getSGNode();
    JSGPanel sgPanel = new JSGPanel();
    sgPanel.setScene(sgNode);
    package test;
    import com.sun.scenario.scenegraph.SGNode;
    import javafx.scene.CustomNode;
    import javafx.scene.Group;
    import javafx.scene.Node;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Circle;
    import javafx.scene.shape.Rectangle;
    public class TestFx extends CustomNode, TestFxInterface {
    public override function create(): Node {
    return Group {
    content: [
    Rectangle {
    x: 10,
    y: 10
    width: 140,
    height: 90
    fill: Color.BLACK
    Circle {
    centerX: 100,
    centerY: 100
    radius: 40
    fill: Color.BLUE
    public override function getSGNode(): SGNode {
    return
    this.impl_getSGNode();
    package test;
    import com.sun.scenario.scenegraph.SGNode;
    public interface TestFxInterface {
    public SGNode getSGNode();
    }

  • How to webStart javafx in eclipse RCP Application.

    My Application is a RCP application containing javafx. I use efxclipse 3.8.2 to developing .   It can run in eclipse.
    I start it with jnlp,it have following errors:
    java.lang.NoClassDefFoundError: javafx/scene/paint/Paint
      at com.macrosan.ui.tree.DevicesRootNode.handleSelectEvent(Unknown Source)
      at com.macrosan.core.common.AbstractTreeNode.handleSelectTreeNode(Unknown Source)
      at com.macrosan.core.event.EventCenter.notifyTreeSelectHandler(Unknown Source)
      at com.macrosan.core.event.EventCenter.sendToEventCenter(Unknown Source)
      at com.macrosan.ui.views.PrimNavigationView$1.selectionChanged(Unknown Source)
      at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
      at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
      at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
      at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188)
      at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1211)
      at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1241)
      at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:239)
      at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:233)
      at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
      at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
      at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1600)
      at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
      at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
      at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
      at org.eclipse.swt.widgets.Display.syncExec(Display.java:4687)
      at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:94)
      at org.eclipse.ui.internal.Workbench.init(Workbench.java:1595)
      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2628)
      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
      at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      at com.macrosan.ui.Application.start(Unknown Source)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
      at org.eclipse.equinox.launcher.WebStartMain.basicRun(WebStartMain.java:79)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
      at org.eclipse.equinox.launcher.WebStartMain.main(WebStartMain.java:57)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at com.sun.javaws.Launcher.executeApplication(Unknown Source)
      at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
      at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: javafx.scene.paint.Paint
      at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:455)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
      at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 58 more

    hi,
    http://www.ericgar.com/2006/10/17/eclipse-jbossas-ejb-30-setup-instructions/love google
    http://www.google.co.in/search?q=steps+to+interact+ejb+with+Eclipse&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

  • JavaFx integration with Enterprise Applications

    Hi I would like some directions on how to connect my JavaFx Front end with a JSF Managed bean in my application. Where is such documentation? As well there is some object oriented way (transparent) to connect to webservices without the need to manage xml, instead deal directly with objects? Is there some documentation on how to access a EJB or a CORBA service from a browser based JavaFx aplication?
    Regards,
    Miguel Garz

    You can find Exadel's Flamingo framework here: [http://exadel.org/flamingo] . Flamingo allows you to connect JavaFX to enterprise back ends such as Seam, Spring and Java EE 6.

  • Hi All! I want to use javaFX controles in vaadin applications pls give some sample code

    Hi All!
    I want to use javaFX 2.0 Controles in Vaadin applications please give some sample code.
    Is it possible or not .
    Regards

    Hi,
    Thanks manish for your reply but i could not get any help from your suggesion because i have know idea in Java.
    I want to know how can we deploy jsp files in Oracle bpel.
    Because i'm not getting the proper way to deploy jsp files in oracle bpel.
    Can any one help me out by providing step by step information or suggest any url to resolve this.
    Regards,
    Nikhil Kumar Jain

  • JavaFX for database driven applications? No Tree or Table components?

    Hi there,
    Most of the apps I do are database driven and require liberal use of tables and tree components. I see these are missing from JavaFX.
    So the questions I have are:
    Will they be introduced later?
    How does one create custom components for JavaFX?
    Are there any 3rd party components that offer this yet?
    thanks

    You can find an example of the Table component creation and usage on page:
    [http://jfx.wikia.com/wiki/SwingComponents|http://jfx.wikia.com/wiki/SwingComponents]

  • How to pass Objects from Java App to JavaFX Application

    Hello,
    New to the JavaFX. I have a Java Swing Application. I am trying to use the TreeViewer in JavaFX since it seems to be a bit better to use and less confusing.
    Any help is appreciated.
    Thanks
    I have my Java app calling my treeviewer JavaFX as
    -- Java Application --
    public class EPMFrame extends JFrame {
    Customer _custObj
    private void categoryAction(ActionEvent e)   // method called by Toolbar
            ocsCategoryViewer ocsFX;    //javaFX treeviewer
            ocsFX = new ocsCategoryViewer();    // need to pass in the Customer Object to this Not seeing how to do it.
                                                  // tried ocsFX = new ocsCategoryViewer(_custObj) ;    nothing happened even when set this as a string with a value
    public class ocsCategoryViewer extends Application {
    String _customer;
    @Override
        public void start(Stage primaryStage) {
         TreeView <String> ocsTree;
         TreeItem <String> root , subcat;
      TreeItem <String> root = new TreeItem <String> ("/");
            root.setExpanded(true);
             ocsTree = new TreeView <String> (root);
             buildTree();     // this uses the Customer Object.
            StackPane stkp_root = new StackPane();
            stkp_root.getChildren().add(btn);
            stkp_root.getChildren().add(ocsTree);
            Scene scene = new Scene(stkp_root, 300, 250);
            primaryStage.setTitle("Tree Category Viewer");
            primaryStage.setScene(scene);
            primaryStage.show();
        public static void main(String[] args) {
            _customer = args[0];      // temporarily trying to pass in string.
            launch(args);

    JavaFX and Swing integration is documented by Oracle - make sure you understand that before doing further development.
    What are you really trying to do?  The answer to your question depends on the approach you are taking (which I can't really work out from your question).  You will be doing one of:
    1. Run your Swing application and your JavaFX application as different processes and communicate between them.
    This is the case if you have both a Swing application with a main which you launch (e.g. java MySwingApp) and JavaFX application which extends application which you launch independently (e.g. java MyJavaFXApp).
    You will need to do something like open a client/server network socket between the applications and send the data between them.
    2. Run a Swing application with embedded JavaFX components.
    So you just run java MySwingApp.
    You use a JFXPanel, which is "a component to embed JavaFX content into Swing applications."
    3. Run a Java application with embedded Swing components.
    So you just run java MyJavaFXApp.
    You use a SwingNode, which is "used to embed a Swing content into a JavaFX application".
    My recommendation is:
    a. Don't use approach number one and have separate apps written in Swing and Java - that would be pretty complicated and unwarranted for almost all applications.
    b. Don't mix the two toolkits unless you really need to.  An example of a real need is that you have a huge swing app based upon the NetBeans platform and you want to embed a couple of JavaFX graphs in there.  But if your application is only pretty small (e.g., it took less than a month to write), just choose one toolkit or the other and implement your application entirely in that toolkit.  If your entire application is in Swing and you are just using JavaFX because you think its TreeView is easier to program, don't do that; either learn how to use Swing's tree control and use that or rewrite your entire application in JavaFX.  Reasons for my suggestion are listed here: JavaFX Tip 9: Do Not Mix Swing / JavaFX
    c. If you do need to mix the two toolkits, the answer of which approach to use will be obvious.  If you have a huge Swing app and want to embed one or two JavaFX components in it, then use JFXPanel.  If you have a huge JavaFX app and want to embed one or two Swing components in it, use a SwingNode.  Once you do start mixing the two toolkits be very careful about thread processing, which you are almost certain screw up at least during development, no matter how an experienced a developer you are.  Also sharing the data between the Swing and JavaFX components will be trivial as you are now running everything in the same application within the virtual machine and it is all just Java so you can just pass data around as parameters to constructors and method calls, the same way you usually do in a Java program, you can even use static classes and data references to share data but usually a dependency injection framework is better if you are going to do that - personally I'd just stick to simply passing data through method calls.

  • JComboBox in Javafx 1.3.1 webstart Application

    I have a big trouble with a Javafx 1.3.1 Application running in our Enterprise. The Application is javafx 1.3.1 witten and there are inside of the application pure java Components integretet with with a SwingComponent. Now the Problem is when i add JComboBoxes into the Container also without filled with information it always produces a high Processor time usage. When i let the hole Application run without the Comboboxes showing the Processor time are only 1% wiht the ComboBoxes it increases up to 50%.

    hi markusg80,
    The javafx 1.3.1 has many bugs related to the controls. It seems you are integrating swing component which is not bad. As javafx 1.3 itself is memory and processor eating so you need to optimize your code to run it faster. I would recommend you to use the javafx controls instead of Swing because javafx need to call the swing engine inside javafx which is probably big processing one. JComboBox consist many JLabels, so may be it's reason to take more processing. Or it may depends on how you are managing the JComboBox Model.
    Thanks,
    Narayan

  • Any way to distribute a javafx application with embedded JRE as a standalone?

    Hey,
    I'm looking for a way to distribute my javafx app, but I want a customer to be able to run it as a standalone (i.e. without installation).
    I know I can distribute a jar file but it's without the embedded JRE.
    Only way I see to embed a JRE is via building an installer.
    Any way I can distribute say an EXE file that when double clicked just runs the app with JRE embedded inside?

    I have already read that guide.
    Here's the relevant section:
    Table 3-1 JavaFX Execution Modes
    Execution Mode
    Description
    Run as a standalone program
    The application package is available on a local drive. Users launch it using a Java launcher, such as java -jar MyApp.jar, or by double-clicking the application JAR file.
    Launched from a remote server using Web Start
    Users click a link in a web page to start the application from a remote web server. Once downloaded, a Web Start application can also be started from a desktop shortcut.
    Embedded into a web page
    JavaFX content is embedded in the web page and hosted on a remote web server.
    Launched as a self-contained application
    Application is installed on the local drive and runs as a standalone program using a private copy of Java and JavaFX runtimes. The application can be launched in the same way as other native applications for that operating system, for example using a desktop shortcut or menu entry.
    According to this, only way to use a private JRE is via the 4th option which means installation.

Maybe you are looking for

  • Error when submitting a podcast to iTunes

    We get the following error: "Podcast cover art must be at least 600 x 600 pixel JPG or PNG, in RGB color space, and hosted on a server that allows HTTP head requests". We validated the feed and tested in iTunes and the podcasts work.  Here is the pat

  • Photoshop CS4 crashing on load in OSX 10.5.6

    Hi, Has anyone experienced Photoshop CS4 crashing at startup just as it's about to load the tools? My computer specs are the following: - Apple PPC G5 Quads 2.5GHz - 4 GB of RAM - 23GBs of free space on the main partition and 182GBs of the secondary

  • How do I  produce buttons that appear at the end of a motion background? Please Help!!!

    I just began working with my new production premuim CS3 suite and the current project that I am working on calls for buttons that appear right the end of the motion background. I have tryed everywhich way I can think of to import and export buttons t

  • What is the font used at the end of the movie trailer, Blockbuster

    Can anyone tell me the name of the FONT used in the I Movie Trailer called Block Buster? I think the opening font says ROADTRIP Thanks so much! A

  • Create/Access DB Connection Node via Ext SDK API

    How do I create/access a database connection in Jdev programmatically? I found the top level Connections folder: oracle.ide.model.Connections in Ext SDK. The documentation says "Top level IDE level Connections Node. Under this node is where various d