JavaFX 1.0 is out!

On http://www.javafx.com
Also: Danny Cowards blog http://blogs.sun.com/theplanetarium/entry/javafx_release_top_10_things
My blog: http://weblogs.java.net/blog/terrencebarr/archive/2008/12/javafx_10_is_he.html
Best,
-- Terrence

Great! I think the serves are little loaded though right now. I have cable internet and the applets are taking forever to load. I think I'll come back later today. Maybe this means lots of java developers are interested!

Similar Messages

  • Javafx.xml in or out?

    Hi.
    The documentation for javafx.xml is missing in the API reference and if I try to import it like
    import javafx.xml.DocumentBuilder;, NetBeans can't find it.
    And yet, I see the javafx.xml source in the SDK in
    ...\NetBeans 6.1\javafx\javafx-sdk1.0pre1\src.zip\javafx\xml
    It looks much like the API described in [http://jfx.wikia.com/wiki/XML_Framework].
    Am I doing something wrong? Do I need to tweak netbeans somehow to find javafx.xml?
    Is the javafx.xml code in or out (or not yet in) of javafx?
    Thanks much!
    Ray

    The XML api was removed just before the preview release Well, that eliminates the confusion.
    I eagerly await seeing the final version (as I'm sure many others are too. :)
    In the meantime, I guess I'll have to fill in with some java code.
    Thanks for the info!

  • Using java.beans.EventHandler to create javafx.event.EventHandler instances

    One thing I do not like about the JavaFX EventHandler is all the anonymous classes that need to be created. This messes up the way the code looks and I heard that creating all these anonymous classes adds to the total number of classes that get loaded.
    In searching for a way around this I found java.beans.EventHandler's create method. This method (there are a few variations of it) its suppose to provide a one liner to create anonymous implementations of listener interfaces (like JavaFX's EventHandler). So I decided to try it out against some of the sample JavaFX code that is out there.
    I used.... http://docs.oracle.com/javafx/2.0/events/KeyboardExample.java.htm... as my test code.
    I replaced...
            private void installEventHandler(final Node keyNode) {
                // handler for enter key press / release events, other keys are
                // handled by the parent (keyboard) node handler
                final EventHandler keyEventHandler = new EventHandler<KeyEvent>() {
                    @Override
                    public void handle(final KeyEvent keyEvent) {
                        if (keyEvent.getCode() == KeyCode.ENTER) {
                            setPressed(keyEvent.getEventType() == KeyEvent.KEY_PRESSED);
                            keyEvent.consume();
                keyNode.setOnKeyPressed(keyEventHandler);
                keyNode.setOnKeyReleased(keyEventHandler);
            }with....
            private void installEventHandler(final Node keyNode) {
                // handler for enter key press / release events, other keys are
                // handled by the parent (keyboard) node handler
                final EventHandler keyEventHandler = (EventHandler)java.beans.EventHandler.create(EventHandler.class, this, "handle", "");
                keyNode.setOnKeyPressed(keyEventHandler);
                keyNode.setOnKeyReleased(keyEventHandler);
    public void handle(final KeyEvent keyEvent) {
                if (keyEvent.getCode() == KeyCode.ENTER) {
                    setPressed(keyEvent.getEventType() == KeyEvent.KEY_PRESSED);
                    keyEvent.consume();
            }It worked. The new code behaved just like the old code.
    One caveat though. The class count did in fact go up by about 20 classes. I ran multiple runs and this was true for all of them. But I only applied this technique on one anonymous class. It could be the case that the real savings in class count come after many instances of swapping out anonymous classes with this technique.
    From the javadoc
    "Also, using EventHandler in large applications in which the same interface is implemented many times can reduce the disk and memory footprint of the application.
    The reason that listeners created with EventHandler have such a small footprint is that the Proxy class, on which the EventHandler relies, shares implementations of identical interfaces. For example, if you use the EventHandler create methods to make all the ActionListeners in an application, all the action listeners will be instances of a single class (one created by the Proxy class). In general, listeners based on the Proxy class require one listener class to be created per listener type (interface), whereas the inner class approach requires one class to be created per listener (object that implements the interface)."
    Edited by: jmart on Apr 23, 2012 2:13 AM

    Well, the idea is that with Java 8 they can be rewritten to something like this:
    private void installEventHandler(final Node keyNode) {
                // handler for enter key press / release events, other keys are
                // handled by the parent (keyboard) node handler
                EventHandler keyEventHandler = keyEvent => {
                        if (keyEvent.getCode() == KeyCode.ENTER) {
                            setPressed(keyEvent.getEventType() == KeyEvent.KEY_PRESSED);
                            keyEvent.consume();
                keyNode.setOnKeyPressed(keyEventHandler);
                keyNode.setOnKeyReleased(keyEventHandler);
            }Basically what you are doing now is sacrificing performance (both in real performance and in a lot of extra garbage created) for a little bit of memory gain. Unless you have good reasons and measurements to back this up I think this would definitely qualify as premature optimization.
    I'm a heavy user of anonymous inner classes myself, having several hundreds of them now in my project and I have yet to run into problems. I often write code like the example below purely for readability and convience:
    Set<String> someSet = new HashSet<>() {{
      add("A");
      add("B");
    new HBox() {{
      getChildren.add(new VBox() {{
        getChildren.add(new Label("Hi"));
      getChildren.add(new VBox() {{
        getChildren.add(new Label("There"));
    }};

  • Where does javafx.io.Storage resources end up?

    My first post here ...
    Well I have made an Desktop application where I use javafx.io.Storage and javafx.io.Resurse. First I thought that I would find the file in my directory tree of my JavaFx desktop app, but it did not. I am using Mac os X and I have tried to look everywhere on my disk and I can not find anything on my disk that has have the same file name as my Storage:
    m_entry = Storage {
       source: "bldconfig.xml"
    }I can load and save data to the file, that is no problem. But it would be interesting to know where the data is ending up if I ever need to delete the file or the data. It would be good to know this for all platforms actually.
    Thank you in advance

    I played a bit with this API when JavaFX 1.2 was out. I found out where the data was stored, but for Windows XP... I used Sysinternals' ProcMon to watch hard disk activity and spot where data was written... Perhaps you have a similar tool for Mac? Or can deduct destination from my findings...
    Here is the code I used:
    // Introduced in JavaFX 1.2
    import javafx.data.Pair;
    import javafx.util.Properties;
    import javafx.io.Storage;
    import javafx.io.Resource;
    import java.io.FileOutputStream;
    import java.io.FileInputStream;
    def FILE_NAME = "properties.java.txt";
    def propFile = Storage { source: "properties.jfx.txt" }
    var pairSequence: Pair[] =
         Pair { name: "WWW", value: "HTML" }
         Pair { name: "Sun", value: "JavaFX" }
         Pair { name: "Adobe", value: "Flex" }
         Pair { name: "Microsoft", value: "Silverlight" }
         Pair { name: "WWW", value: "Ajax" }
         Pair { name: "French", value: "Àvéc dès âccênts àrbîtrâïrês !" }
         Pair { name: "Français", value: "Yes, I am..." }
         Pair { name: "A=B", value: "true" }
         Pair { name: "Foo Bar", value: "false" }
         Pair { name: "#Foo", value: "bar" }
    // Note that WWW is twice in the sequence!
    var propsOut: Properties = Properties {};
    function PutPair(props: Properties, pair: Pair)
         props.put(pair.name, pair.value);
    for (pair in pairSequence)
         print("{pair.name} ");
         PutPair(propsOut, pair);
    println("");
    // Writes information in source's path
    var fosJ: FileOutputStream = new FileOutputStream(FILE_NAME);
    propsOut.store(fosJ);
    fosJ.close();
    // Writes information in C:\Documents and Settings\PhiLho\Sun\JavaFX\Deployment\storage\muffin\
    // with a 78e9b9eb-1b6c06c9 (for exampe) file holding the data and a 78e9b9eb-1b6c06c9.muf
    // pointing where to extract temporarily the file (in the place where the .class files are).
    // Obviously, path is for Windows XP, will vary for other systems
    var fosJFX = propFile.resource.openOutputStream(true);
    propsOut.store(fosJFX);
    fosJFX.close();
    // We loose one WWW
    var propsIn: Properties = Properties {};
    var fisJ: FileInputStream = new FileInputStream(FILE_NAME);
    propsIn.load(fisJ);
    fisJ.close();
    println("{propsIn.get("Sun")} / {propsIn.get("WWW")} / {propsIn.get("French")} / {propsIn.get("Français")} / {propsIn.get("A=B")} / {propsIn.get("#Foo")}");
    var fisJFX = propFile.resource.openInputStream();
    propsIn.load(fisJFX);
    fisJFX.close();
    println("{propsIn.get("Sun")} / {propsIn.get("WWW")} / {propsIn.get("French")} / {propsIn.get("Français")} / {propsIn.get("A=B")} / {propsIn.get("#Foo")}");Not rocket science, but interesting... :-)

  • Emty topic window in Nimbus Look and Feel

    I have Java applications using OHJ. When we swith to Nimbus Look and Feel our topic Windows is blank. Helps work correctli in other look and feels. If I print topic it's is printed correctly, so information is there but it is not visible.

    AndrewThompson64 wrote:
    No, I'd say it is a pity that you did not initially use layouts when creating the code in Netbeans. There is no point blaming the tool. Well, some of this code is almost 10 years old (and i didn't write it), and back then nobody used layouts correctly. Even now java layouts are a pain to use compared with other GUI layouts (FLEX, HTML). Our customer just wants a prettier GUI on top of this legacy java app.
    We looked at incrementally using JavaFX to slowly change out screens, but it doesn't support integration with a regular java application (why?)
    Even with a unsupported workaround i cannot open a modal dialogs from JavaFX. I think they are targeting JavaFX at the wrong market, it is usless as a RIA and will never beat out Flash. They should have targeted it as a Swing replacement. Just my 2 cents.
    >
    That seems a shoddy 'solution'. Even the current code under the current PLAF might fail on another screen size, resolution, default font size or a number of other factors..This is true, unfortunately the code base is very very large (300k lines).

  • Task.cancel() throw exception

    Hi,
    I'm new to JavaFx and recently try out example on javafx.concurrent.Task:
    Example is from a book:
    The following is the model class
    private static class Model {
            public Worker<String> worker;
            public AtomicBoolean shouldThrow = new AtomicBoolean(false);
            private Model() {
                worker = new Task<String>() {
                    @Override
                    protected String call() throws Exception {                   
                        updateTitle("Example Task");
                        updateMessage("Starting...");
                        final int total = 250;
                        updateProgress(0, total);
                        for (int i = 1; i <= total; i++) {
                            try {
                                Thread.sleep(20);
                            } catch (InterruptedException e) {
                                if (isCancelled()) //I modified this part to check for isCancelled()
                                    return "Cancelled at " + System.currentTimeMillis();
                            if (shouldThrow.get()) {
                                throw new RuntimeException("Exception thrown at " + System.currentTimeMillis());
                            updateTitle("Example Task (" + i + ")");
                            updateMessage("Processed " + i + " of " + total + " items.");
                            updateProgress(i, total);
                        return "Completed at " + System.currentTimeMillis();
        }On JavaFx, it has 2 Label that are bind to Worker.value and Worker.exception as shown below:
    value.textProperty().bind(
                    model.worker.valueProperty());
                exception.textProperty().bind(new StringBinding() {
                        super.bind(model.worker.exceptionProperty());
                    @Override
                    protected String computeValue() {
                        final Throwable exception = model.worker.getException();
                        if (exception == null) return "";
                        return exception.getMessage();
                });Next: There are 3 buttons "Start", "Cancel" and "Exception". Following is the method to hook up events to all three buttons:
    private void hookupEvents() {
            view.startButton.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent actionEvent) {
                    new Thread((Runnable) model.worker).start();
            view.cancelButton.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent actionEvent) {
                    model.worker.cancel();
            view.exceptionButton.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent actionEvent) {
                    model.shouldThrow.getAndSet(true);
        }Now, first test is when Task is successfully executed. Value label will be filled with the return value i.e: Completed at ......................
    Second is throw exception and the result is as what in the book, the exception label is filled with the exception property. i.e. Exception thrown at ..................
    But when I test the Cancel button, it throws and exception instead of return a String value.
    The exception label is filled with:
    "Task must only be used from the FX Application Thread"
    Instead of having Value label filled with: "Cancelled at .................."
    Can anybody help me please?
    Regards,
    Henri

    i got the same problem and I'm interested in an answer too.
    My Workaround was to have a secon AtomicBoolean-Var
    public AtomicBoolean cancel = new AtomicBoolean(false);
    if (cancel.get()) {
        return "Cancelled at " + System.currentTimeMillis();
    }this code works but it cannot be the answer.

  • Mac OS X Hello World: Texture Dimensions exceed maximum texture size

    Just installed Netbeans 7.1 beta and JavaFX to try it out for the the first time.
    Using Java 1.6_26 with OS X 10.6.6
    I tried creating a new project. It generates a default Hello World app. I tried running this app without modifications. If opens a blank window but then crashes with runtime exceptions as follows. Can anyone suggest where I may be going wrong?
    init:
    Deleting: /Users/shannah/NetBeansProjects/JavaFXApplication2/build/built-jar.properties
    deps-jar:
    Updating property file: /Users/shannah/NetBeansProjects/JavaFXApplication2/build/built-jar.properties
    Compiling 1 source file to /Users/shannah/NetBeansProjects/JavaFXApplication2/build/classes
    compile-single:
    run-single:
    java.lang.RuntimeException: Requested texture dimensions (256x4096) require dimensions (256x0) that exceed maximum texture size (2048)
         at com.sun.prism.es2.ES2Texture.create(ES2Texture.java:147)
         at com.sun.prism.es2.ES2ResourceFactory.createTexture(ES2ResourceFactory.java:45)
         at com.sun.prism.impl.BaseResourceFactory.createMaskTexture(BaseResourceFactory.java:131)
         at com.sun.prism.impl.GlyphCache$GlyphManager.allocateBackingStore(GlyphCache.java:447)
         at com.sun.prism.impl.GlyphCache$GlyphManager.allocateBackingStore(GlyphCache.java:444)
         at com.sun.prism.impl.packrect.RectanglePacker.getBackingStore(RectanglePacker.java:69)
         at com.sun.prism.impl.GlyphCache.getBackingStore(GlyphCache.java:261)
         at com.sun.prism.impl.ps.BaseShaderGraphics.drawString(BaseShaderGraphics.java:1151)
         at com.sun.prism.impl.ps.BaseShaderGraphics.drawString(BaseShaderGraphics.java:1066)
         at com.sun.javafx.sg.prism.NGText.drawString(NGText.java:967)
         at com.sun.javafx.sg.prism.NGText.renderContent(NGText.java:1191)
         at com.sun.javafx.sg.prism.NGNode.renderRectClip(NGNode.java:324)
         at com.sun.javafx.sg.prism.NGNode.renderClip(NGNode.java:351)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:177)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1143)
         at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
         at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:420)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1143)
         at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1143)
         at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1143)
         at com.sun.javafx.tk.quantum.AbstractPainter.doPaint(AbstractPainter.java:257)
         at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:187)
         at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:65)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
         at com.sun.prism.render.RenderJob.run(RenderJob.java:39)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
         at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:102)
         at java.lang.Thread.run(Thread.java:722)
    java.lang.RuntimeException: Requested texture dimensions (256x4096) require dimensions (256x0) that exceed maximum texture size (2048)
         at com.sun.prism.es2.ES2Texture.create(ES2Texture.java:147)
         at com.sun.prism.es2.ES2ResourceFactory.createTexture(ES2ResourceFactory.java:45)
         at com.sun.prism.impl.BaseResourceFactory.createMaskTexture(BaseResourceFactory.java:131)
         at com.sun.prism.impl.GlyphCache$GlyphManager.allocateBackingStore(GlyphCache.java:447)
         at com.sun.prism.impl.GlyphCache$GlyphManager.allocateBackingStore(GlyphCache.java:444)
         at com.sun.prism.impl.packrect.RectanglePacker.getBackingStore(RectanglePacker.java:69)
         at com.sun.prism.impl.GlyphCache.getBackingStore(GlyphCache.java:261)
         at com.sun.prism.impl.ps.BaseShaderGraphics.drawString(BaseShaderGraphics.java:1151)
         at com.sun.prism.impl.ps.BaseShaderGraphics.drawString(BaseShaderGraphics.java:1066)
         at com.sun.javafx.sg.prism.NGText.drawString(NGText.java:967)
         at com.sun.javafx.sg.prism.NGText.renderContent(NGText.java:1191)
         at com.sun.javafx.sg.prism.NGNode.renderRectClip(NGNode.java:324)
         at com.sun.javafx.sg.prism.NGNode.renderClip(NGNode.java:351)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:177)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1143)
         at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
         at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:420)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1143)
         at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1143)
         at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:205)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
         at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
         at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1143)
         at com.sun.javafx.tk.quantum.AbstractPainter.doPaint(AbstractPainter.java:257)
         at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:181)
         at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:65)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
         at com.sun.prism.render.RenderJob.run(RenderJob.java:39)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
         at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:102)
         at java.lang.Thread.run(Thread.java:722)
    JavaFX application launcher: calling System.exit
    BUILD SUCCESSFUL (total time: 20 seconds)

    It's a slightly different error message and stack trace, but pretty similar to that in this thread =>
    JavaFX2 sample app: Error creating framebuffer object
    You can try the workaround suggested in the thread =>
    Use runtime parameter -Dprism.order=j2d to select a SW pipe.
    You can also log a jira at http://javafx-jira.kenai.com, or post your trace and configuration in a comment on a similar Mac rendering error jira to get an Oracle Tech to look at your error.

  • Is any stable solution for coding HTTPService based GUIs with JFX known ?

    hello dear people,
    i am using javafx since it came out for Linux and started to use it quite extensively but at one point i could not deal with this technology, it seems like the most basic client to server communication features are not stable yet and i am very curious if there is a link to an example where the jfx source code allows significantly more than 10 HTTPRequests to be send by a jfx-client to a HTTPServer..let me xplain what i tried yet but what always ended up not working stable.
    for me when developing RIAs often cooks down to simple communication with a REST Service and i tried this one year ago already with but i still refuse to write Java Interfaces to make use of Java in the suggested way in [the post by baechul|http://blogs.sun.com/baechul/entry/javafx_1_2_async] (updated link, though new questions regarding destroying of the threaded Task -- see comments) for writing a simple REST-Client working in jfx ... so i tried the following two ways
    a) using the SwingWorker Util-Lib with the JFXTras Worker Classes and some Java URLRequests i think but the app got stucked while making continously REST-Calls to my server... and now with 1.3 i wanted this to code from scratch and clean, but again this time i am using the straight forward jfx-api way
    b) with the io.HTTPRequest{} Class and the app still keeps hanging after a couple of request..
    the signs of this fault, despite that the flags, started, connecting, etc. of the HttpRquest Class seem not to change at all (even if the requests are send out correctly by the jfx application) when the client stops to send out HTTPRequests, for example the onConnecting Handler is never called..
    so under the hood i still have to face this problem and maybe this is related to the [unanswered post here |http://forums.sun.com/thread.jspa?forumID=934&threadID=5385815] .. and i wonder if it has something to do with the issue threaded [in this forum related to hanging HTTPReqs here|http://forums.sun.com/thread.jspa?forumID=934&threadID=5396227].
    if i remember my tests from last year right, this wasn`t only happening on linux and up to today any javafxclient build from me stops sending out URLRequests while it doesn`t matter if those are PUTs, GETs or POSTs after more than let me count --approximately 8-12 request.start(); calls in an application.. i used to create new var req : HTTPRequest in each method of my RestClient.fx and run my app always as "Application" from Netbeans 6.9 with the jdk 1.6.20 and sdk1.3 on ubuntu 10.04. i am sorry for not having the time to give you the code here yet cause it doesn`t make sense for me now to describe to you how to setup the RESTservice i am developing with .. but i think this is a real issue for jfx-applications and the people who deal with this kind of problems generally have their development environments setup to try this out very easily.
    thanks for any pointers to examplary code that serves stable asynchronous client-server communication for gui-developers. i really would like to make use of this very nice API because i acknowledge its scenegraph and additional graphics power very very much !!
    Thanks in advance for sharing your insights, thoughts and links on this !
    update: i just dived into the twitterFX project but the app does not run on my computer and i also wonder why it has defined dependency to make use of the [httpclient javalib|http://hc.apache.org/downloads.cgi] while the community [doc from april 2009 here|http://java.sun.com/developer/technicalArticles/javafx/AppORama/] seems to report intense usage of the HTTPRequest Class
    update2: what basically can be observed when debugging my application is that for each HTTRequest there is a thread created under the parent "request io pool" named either 'io.N' or simply 'Thread-3' and all of which are in the state 'running' even after the request is nominally done. additionally under the root of the system-thread, everytime a HTTPRequest is created a "Keep-Alive-Thread" is running which has a quite thrilling name, but when this vanishes every thread under the "request io pool" is still Alive
    so from far out this looks quite similiar to the scnd post i mentioned here before and which can be found now here again, but i don`t know if this is correct behaviour, means: when a thread-object is meant to be destroy - maybe it is related to eventHandlers attached to my HTTPRequest{} Object but thats just a vague assumption
    i am linking in more resources related to this problem: for example [this post|http://forums.sun.com/thread.jspa?forumID=932&threadID=5392824] is reporting about a problem might be specific for POST requests, though i doubt that, which is: the object never gets into the state of HTTPRequest.isDone. i tried this out with my code, too and my HTTPRequest objects never call the onDone: function () {} it would be nice to have some more knowledge about that..
    Edited by: mremote on Jul 20, 2010 8:32 AM
    Edited by: mremote on Jul 20, 2010 9:08 AM

    hello dear application developers,
    i just found out that the translateFX runs pretty smooth (even over more than 10 request) and i tried to find out the differences between this and my implementation.. for me, the differences seem not really significant but somehow they must be so.. considering the different behaviour:
    the HttpRequest Objects are encapsulated both times as different kind of variables in a simple instance of an object:
    - the translateFX code just uses one var request : HTTPRequest and one var parser:PullParser resp. as Class.Attributes over and over again to which in the function just new HttpRequest{} are assigned on every call, so i assume that there is at most one HttpRequest at a time possible which might be dereferenced while still running
    - opposed to that i have in my code the HttpRequest as Local Variables which should be created and destroyed within the execution time of my function body, though i do not f ully understand how my anonymous handler functions assigned to e.g. HttpRequest.onInput may be deleted after the code executor has already run through my function body..
    - another difference is that the author if translateFX closes his PullParser.inputStream at the end of his function body... although i quite not understand why this should make sense.. bcause when this part is called, the PullParser will not be instantiated yet, this is done in the handler when the Response from the Server gets Back and the InputStream is starting to float in. this line of code parser.input.close(); seems to be called to prevent unexpected behaviour cause he`s working with the parser as a Class.Attribute
    so even i changed my implementation at both points both to the translateFX approach, i feel disappointed to say that i still don`t know why after a couple of HttpRequest.start(); none is send out from my app anymore and there is no difference in between running the app from within the browser, launching it with Webstart or running it as an Application..
    if someone has some time to investigate here - [there is|http://github.com/jri/deepamehta3/downloads] the latest snapshot of our application server which i use. (after its extraction and startup this package serves instantly a RESTservice on your local computer including. jetty webserver and deepamehta as a prepackaged osgi system)
    i will soon upload the whole app to my [github repository|http://www.github.com/mukil] soon... it hoepfully will be a kind of DetailPanel for a TopicMap Navigator one day
    basically the problems are happening after a couple of call of this simple code...
        var coreServiceURI : String = "http://localhost:8080";
        var gRequest : HttpRequest;
        var gModel : ClientModel = ClientModel.getInstance();
        /* loads a topic from the application service */
        public function getBaseTopic ( topicId:Long, params:String, cache:Boolean, index:Integer ) : Void {
          // var topic : FXBaseTopic = null;
          var parser :  PullParser;
          gRequest = HttpRequest {
            location: "{coreServiceURI}/core/topic/{topicId.toString()}";
            method: HttpRequest.GET;
            headers: [
              HttpHeader { name: HttpHeader.CONTENT_TYPE; value: "application/json"; },
              HttpHeader { name: HttpHeader.CONTENT_LENGTH; value: "{params.getBytes().length}"; }
            onStarted: function() { gModel.connectionStatusMessage = "dmc.loadingStarted({gRequest.method
               }, {gRequest.location})";
            onResponseMessage: function(msg:String) { gModel.connectionStatusMessage = "dms.responseMessage: {msg}"; }
            onInput: function(os: java.io.InputStream) {
              var id: Long;
              var type: String;
              var label: String;
              //var properties : FXDataField[] = [];
              var properties : String[];
              // os;
              parser = PullParser {
                documentType: PullParser.JSON;
                input: os;
                onEvent: function(event: Event) {
                  if (event.type == PullParser.INTEGER and event.level == 0) {
                    if (event.name == "id") {
                        id = event.integerValue;
                        //println("setTopic: {event.integerValue}, ");
                  } else if (event.type == PullParser.TEXT and event.level == 0) {
                    if (event.name == "type_uri") {
                        type = event.text;
                        //println(" {event.text}, ");
                    } else if (event.name == "label") {
                        label = event.text;
                        // println(" {event.text} \n");
                  } else if (event.type == PullParser.INTEGER and event.level == 1) {
                    // wether properties are integers or strings
                    insert event.integerValue into properties;
                  } else if (event.type == PullParser.TEXT and event.level == 1) {
                    insert event.text into properties;
                  } else if (event.type == PullParser.END_DOCUMENT){
                    println("[SERVER] --- dmc.gotBaseTopic: {id}, {type}, {label} with a propAt1: \"{properties.get(2).toString()}\"");
                    // topic = FXBaseTopic {
                      id = id;
                      type_uri = type;
                      label = label;
                      properties = properties;
              parser.parse();
            onException: function(ex: java.lang.Exception) {
                println("*** dms.onException: {ex.getClass()} {ex.getMessage()}");
          gRequest.start();
          parser.input.close();
        }i really dont think that this is related to problems with running javafx apps on jvms build for amd64 linux, because i`ve had similare behaviour as i still was running the 32bit version of the jvm (though that was other code and is now nearly a year ago)
    maybe someone sees the problems right away... any help is very appreciated.. and links to other working solutions would still be great !

  • Hi resource usage or it is normal?

    Hi, i have started experimenting with javafx. i liked it so much. but i noticed it consumes a lot of memory in some cases. Below code generates around 2000 Bubble object. But if you extend the number it gives an out of memory exception. i think this is a pretty small number for occupying 64MB heap. Any comments or suggestions?
    public class Bubble extends CustomNode{
        public var cap:Integer;
        public override function create(): Node {
            return Group {
                content: [
                    Circle{ opacity:0.1 radius: cap}
                    Circle{ opacity:0.2 radius: cap/2}
                    Circle{ opacity:0.4 radius: cap/3}
    function generate(): Bubble[] {
        var rand:Random = new Random();
        var bubbles: Bubble[]=[];
        for(i in [0..100]) {
            def bubble = Bubble  {
                layoutX:rand.nextInt(300)+100
                layoutY:rand.nextInt(300)+100
                cap: rand.nextInt(10)+10
            insert bubble into bubbles;
        return bubbles;
    Stage {
        title: "Dark Cloud"
        width: 500
        height: 500
        scene: Scene {
            content: [
                for(i in [0..20])
                    generate()
    }

    Somehow, it illustrates the power and limitations of JavaFX design.
    I also code in Processing, which is more or less Java code using an easy to use graphics library.
    Unlike JavaFX, Processing is low level (in 2D), ie. it is a canvas on which you draw primitives. If you want Rectangles, Ellipses or other more or less complex nodes, you have to code them yourself.
    The advantage is that you can make tighter code: Your Bubble class creates an Integer, a Group and three Circle, that's 4 Nodes, coming with all their variables, Boolean, Number, sequence of Transformation, various Bounds, Cursor, Effect, functions (the variables, not the members), etc. Even set to their default, that's a lot of memory, even more as a Boolean isn't a Java boolean.
    While in Processing, you would do the same class with an int for the cap, two for the coordinates, perhaps a static int for the color if shared by all bubbles, etc. I bet it would take much less memory to do your test than JavaFX does.
    Granted, JavaFX is then ready out of the box to do effects and transforms, handle clicks, etc. But sometime, for simple dumb objects, it is just overkill...
    So maybe JavaFX isn't suited for applications that are commonplace in Processing, like handling million of particles, unless using tricks like making its own canvas and using bitmap drawing...

  • Create and bind javafx objects out of java

    hello,
    iam start to learn javafx and cant find the right way to do what i want.
    the goal is: i have written a graph datastructure in java and want to parse a xml file. for every String in the xml file a new node in the graph should be created. this node holds the data and a position (2D). now evertime a node in the graph was created, a visual representation for this node should pop out in my javafx stage. when the position of the node changed the visual rep. should notice this or rather a function on this object is called (observer).
    is javafx an approach to do so? or should i use java2d?
    do you know a tutorial where i can learn how to create an call javafx objects out of java and how to put them into the stage/scene?
    i found this: http://java.sun.com/developer/technicalArticles/scripting/javafx/javafx_and_java/index.html
    but there is not mentioned how to put the object into the stage/scene.
    regards
    peter

    thanks. this is also a good article. [http://blogs.sun.com/michaelheinrichs/entry/binding_java_objects_in_javafx|http://blogs.sun.com/michaelheinrichs/entry/binding_java_objects_in_javafx]
    Edited by: iam_peter on May 23, 2009 4:49 AM

  • Many JavaFX issues pushed out of JavaFX 8 (to 9) today

    I received a bunch of emails today from Jira as Kevin Rushforth triaged numerous JavaFX Runtime issues out of JavaFX 8. I read through The openjfx-dev Archives and didn't see any plans announced for a major triaging effort or how to respond if your issue is pushed out of the release.
    Some of these issues are regressions introduced in JavaFX 8 and others are important bugs that my company and our customer needs resolved in JavaFX 8.
    Here are the main issues that I would like to see fixed in JavaFX 8 that were triaged to JavaFX 9 today:
    WebView select bug: https://javafx-jira.kenai.com/browse/RT-33717
    WebView select bug: https://javafx-jira.kenai.com/browse/RT-16078
    Regression: https://javafx-jira.kenai.com/browse/RT-32355
    I made a comment in the issue to this effect, but I'm not sure that will make any difference.
    What is the process to go through in order to get these issues looked at in JavaFX 8?

    Hi all,
    I'm an engineer in the JavaFX team, and I thought I'd just clarify a few things. Firstly, we're now in rampdown for Java / JavaFX 8.0. This means we are (and have been) actively moving low priority work out of this release and retargeting it at 9.0. Right now we are only working on what we call P1-P3 bugs (or, in Jira terms, showstopper, critical, and major bugs), and in fact we are also deferring many major bugs out of 8.0 too.
    This is not because we don't value your bug reports or think lesser of you as a human being - it is that we work to a schedule and the 8.0 train is getting close to leaving the station, and we have to be on it. This requires us to get our actual bugs in the 8.0 release to zero, which requires the deferrals that you're now seeing happening. And, to be clear, we think the JavaFX community is wonderful ;-)
    It is very important to understand that just because we are retargeting our work to 9.0 does not mean that these bugs won't be fixed until whenever 9.0 is released! Once 8.0 is out the door (well, once we stop working on it, because there is a long period between the engineers stopping the bulk of their 8.0 work and the 8.0 release actually coming out) we will all fully evaluate our backlogs and target many of these bugs to the interim 8.x releases. This means that many of these bugs will be fixed next year in follow-up releases to 8.0, just as we have done with follow-up releases to JavaFX 2.x.
    So, in other words, targeting to 9.0 is a placeholder for us to say 'some release in the future'. You can of course leave comments to impress on us the importance of your favourite bugs (and I encourage you to do that and also vote). Unless we hear from the community on the bugs that are important to them they tend to get prioritised by the engineers based on their own opinions, which doesn't necessarily show us the full picture.
    To answer KonradZuse's comment about 9 and "Van Ness": we did call the project "Van Ness" in jira for quite some time, but we had people complain (on openjfx-dev I believe) that Van Ness was meaningless, so we changed our jira to instead just use version numbers, hence 8u5, 8u20, 9, etc. For all intents and purposes "Van Ness" was a nebulous phrase intended to mean "some future release", so we've basically tightened up our definitions a bit by splitting Van Ness into a number of versions now.
    I hope that helps to clarify some things. In short, we're working as hard as we can, and definitely want to keep you happy. Get on to jira and leave bug reports or comments on bug reports. Do not count on comments left in these forums to necessarily reach the engineers responsible for the bugs - go to them via jira.
    -- Jonathan

  • Check out My Application Search 3.0 for the JavaFX competition

    Hi guyz can you tell me reviews for the application I created for JavaFX competition
    link - www.pinkstechno.com
    u can find the embedded applet and jnlp file here......
    By the enable pop up and it takes a little bit time to load....

    pros:
    very pretty.
    very simple interface
    Perfect kind of 'demo' app
    cons:
    I wish some of the search results were more opaque to start with..can't read them until click because of the background
    Some of the fade-ins are a little slow... (maybe just my box)
    and scrolling through the results a little slow....(maybe just my box)
    clicking video or 'general' entry didn't take me anywhere (should it?)
    what is the "no dimensions check spelling" thing?

  • When is JavaFX 1.0 actually due out?

    I've heard Fall 2008 and Spring 2009. Does anyone know which date is correct?
    Thanks

    If they do it anything like the preview release, it will be out at 11:59pm on December 20, 2008- the last minute of Fall. :)

  • Issue with DataApp Sample in JavaFX.

    Okay so I downloaded the Samples pack here http://jdk8.java.net/download.html or here http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html at the bottom.
    Inside is one called DataApp which requires setting up an SQL DB, and connecting to it.
    In Netbeans8 I get an error about not having RestLib api inside the DataAppClient which according to the setup DataAppClient - The JavaFX 2.0 client application. inside there you can see a package with packages that wont import such as
    import com.sun.jersey.api.client.Client;
    import com.sun.jersey.api.client.UniformInterfaceException;
    import com.sun.jersey.api.client.WebResource;
    import com.sun.jersey.api.json.JSONConfiguration;
    So why am I in a Java 8 samples pack needing FX 2? Though I'm not sure if it's FX8 yet, I just didn't think the 2.0 client would work.
    So I tried Netbeans 7.3 to see if it would work. At first the DataAppClient was fine, but I see the DataAppPreloader will not run because it uses Package javafx.something which apparently is new in Java 8.....
    So now I'm stuck, wondering why Restlib doesn't exist... I looked it up, and it says it's used for Web services, but I don't have it, nor does it say to install it in the readme.
    not existing, which I guess has to do with the RestLib?
    Anyone have any ideas?
    EDIT: So I just downloaded the version for FX2, and I am still getting the same error when I run it, though nothing shows "errors" in the packages. Maybe I just needed to run it correctly for it to work, so not what is this error tellingme
    Creating "dataapp" user and "APP" database...
    Executing commands
    Failed to execute:  INSERT INTO user VALUES ('localhost','dataapp','*B974A83D18BB105D0C9186756F485406E6E6039B','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',NULL)
    C:\Users\Konrad\Downloads\javafx_samples-2_2_7-windows\javafx-samples-2.2.7\src\DataApp\DataAppLoader\build.xml:84:
    java.sql.SQLException: Column count doesn't match value count at row 1
         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2618)
         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
         at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:842)
         at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:681)
         at org.apache.tools.ant.taskdefs.SQLExec.execSQL(SQLExec.java:775)
         at org.apache.tools.ant.taskdefs.SQLExec.runStatements(SQLExec.java:745)
         at org.apache.tools.ant.taskdefs.SQLExec$Transaction.runTransaction(SQLExec.java:1043)
         at org.apache.tools.ant.taskdefs.SQLExec$Transaction.access$000(SQLExec.java:985)
         at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:653)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
         at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:601)
         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
         at org.apache.tools.ant.Task.perform(Task.java:348)
         at org.apache.tools.ant.Target.execute(Target.java:392)
         at org.apache.tools.ant.Target.performTasks(Target.java:413)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
         at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
         at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
         at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
    BUILD FAILED (total time: 6 seconds)I have put the 1.18 derby file into glassfish, download and set up MySQL using a netbeans reference,I had set my root password and such as well.
    The only thing I haven't done is created a DB, but I don't think I need one, and the instructions don't say anything.
    I have Netbenans 7.3, 8, and Java vers 7_15 and 8 build 82.
    GlassFish 3.1.2 as well as 4.0 build 76 which I haven't installed.
    I hav e MySQL 5.6
    Java FX 2.0 and 8 build 82.
    The instructions are
    DataApp Installation Guide
    Table of Contents
    Prerequisites
    Setting Up the DataApp Sample
    Running the Sample
    NetBeans Projects for the Sample
    Licensing
    Prerequisites
    You must have the following software installed to run the DataApp sample:
    Java SDK 1.6.0_24 or later
    Available at http://www.oracle.com/technetwork/java/javase/downloads/index.html.
    JavaFX 2.0 SDK or later
    Available at http://javafx.com/downloads/all.jsp.
    MySQL 5.5 or later
    Available at http://dev.mysql.com/downloads/.
    You need to know the root password for your installation.
    Netbeans 7.1 with Java EE and GlassFish 3.1.1 or later
    Available at http://netbeans.org/downloads/.
    Run the NetBeans installer to install NetBeans and GlassFish to the default locations.
    Setting Up the DataApp Sample
    Install the MySQL drivers into GlassFish.
    Manually copy the mysql-connector-java-5.1.13-bin.jar file from the netbeans-install-dir\ide\modules\ext\ to the glassfish-install-dir/glassfish/lib directory, where netbeans-install-dir and glassfish-install-dir are the directories into which the products were installed. For example, on Windows the install directory for products is typically in the C:\Program Files\ or C:\Program Files (x86)\ directories.
    Open the following DataApp projects in NetBeans by selecting File ->Open Project and navigating to the location of the DataApp sample:
    DataAppClient
    DataAppLibrary
    DataAppLoader
    DataAppPreloader
    DataAppServer
    Configure and create the database (only needs to be done once):
    In NetBeans, right-click the DataAppLoader project.
    Select Run.
    Enter your MySQL root password when prompted.
    Wait until you see the message that the build has successfully finished, which takes approximately 5 to 15 minutes.
    Running the Sample
    Start the server:
    In NetBeans, right-click the DataAppServer project.
    Select Run.
    Wait until a browser window opens that says: YOU ARE DONE!
    (Optional) Start the standalone client:
    In NetBeans, right-click the DataAppClient project.
    Select Run.
    NetBeans Projects for the Sample
    DataAppLibrary - Contains the following data:
    Database tables
    ORM model to database tables
    DataAppLoader - Application that is run once to perform the following tasks:
    Creates the database.
    Loads all of the static data for the data app.
    Creates some historical data.
    DataAppServer - Web server that performs the following tasks:
    Simulates auto sales and persists them to the database.
    Provides access to the database through web services.
    DataAppClient - The JavaFX 2.0 client application.
    Licensing
    The license for the DataAppLoader/zip_code_inserts.sql file is the Creative Commons Attribution-ShareAlike license, which is available at http://creativecommons.org/licenses/by-sa/2.0/.
    The license for all other files is the BSD style license:
    * Copyright (c) 2008, 2011 Oracle and/or its affiliates.
    * All rights reserved. Use is subject to license terms.
    * This file is available and licensed under the following license:
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * - Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    * - Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in
    * the documentation and/or other materials provided with the distribution.
    * - Neither the name of Oracle Corporation nor the names of its
    * contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    Copyright © 2011, Oracle and/or its affiliates. All rights reservedEdited by: KonradZuse on Mar 27, 2013 9:39 AM
    Edited by: KonradZuse on Mar 27, 2013 9:51 AM
    Edited by: KonradZuse on Mar 27, 2013 9:58 AM

    I found the same issue but resolved it by myself. The user table of the MySQL changed, my guess. You need to add another 'Y' or 'N' to the end of this statement in the build.xml of DataAppLoader:
    INSERT INTO user VALUES ('localhost','dataapp','*B974A83D18BB105D0C9186756F485406E6E6039B','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',NULL,'N');
    The original one is like this:
    INSERT INTO user VALUES ('localhost','dataapp','*B974A83D18BB105D0C9186756F485406E6E6039B','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',NULL);
    The new column added is password_expired. Y or N to indicate the password is good or not.

  • JavaFX Update Line Chart on Tab pane

    Hi all,
    I am wondering can anybody help with this problem.
    I have an application that can create a new tab when the LineChart FXML view is called by way of onMouseClicked event from a bar graph (using scenebuilder). However, I need this Line chart to update when the user clicks a new bar on the bar graph page to show this new data.
    Initially the Line chart tab will open and display data from the first bar graph click and when I click another bar in Tab A (bar chart) if it has the same number of rows it will refresh the LineChart tab otherwise I get an error. Then if I try to load another line graph tab using a different bar graph as the source I get a child duplication error
    (So tab A has a bar graph that calls tab B to represent data as a line graph, however it wont do it more then once when there is a different number of points to show)
    (Also tab C, another Bar chart will not load a new tab) Exceptions below & Class detail below.
    I am using clear() to empty the observable list I have which is used to populate the graph and table before it reads in the new data values
    What is the proper way/ best way to dynamically add another tab and update the chart in the tab with new values? Any help would be appreciated.
    I am getting the following exceptions:
    Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: Index: 11, Size: 7
      at java.util.ArrayList.rangeCheckForAdd(ArrayList.java:661)
      at java.util.ArrayList.add(ArrayList.java:473)
      at com.sun.javafx.collections.ObservableListWrapper.doAdd(ObservableListWrapper.java:101)
      at javafx.collections.ModifiableObservableListBase.add(ModifiableObservableListBase.java:151)
      at com.sun.javafx.collections.VetoableListDecorator.add(VetoableListDecorator.java:320)
      at com.sun.javafx.scene.control.skin.TabPaneSkin$TabHeaderArea.addTab(TabPaneSkin.java:854)
      at com.sun.javafx.scene.control.skin.TabPaneSkin$TabHeaderArea.access$500(TabPaneSkin.java:659)
      at com.sun.javafx.scene.control.skin.TabPaneSkin.addTabs(TabPaneSkin.java:276)
      at com.sun.javafx.scene.control.skin.TabPaneSkin.lambda$initializeTabListener$463(TabPaneSkin.java:357)
      at com.sun.javafx.scene.control.skin.TabPaneSkin$$Lambda$108/885312968.onChanged(Unknown Source)
      at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
      at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
      at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
      at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
      at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
      at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
      at javafx.collections.ModifiableObservableListBase.add(ModifiableObservableListBase.java:155)
      at java.util.AbstractList.add(AbstractList.java:108)
      at javafxapplication2.FXMLExecutionChartController$3.handle(FXMLExecutionChartController.java:262)
      at javafxapplication2.FXMLExecutionChartController$3.handle(FXMLExecutionChartController.java:241)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
      at javafx.event.Event.fireEvent(Event.java:198)
      at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3437)
      at javafx.scene.Scene$ClickGenerator.access$7900(Scene.java:3365)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3733)
      at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3452)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1728)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2461)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:348)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:273)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:382)
      at com.sun.glass.ui.View.handleMouseEvent(View.java:553)
      at com.sun.glass.ui.View.notifyMouse(View.java:925)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102)
      at com.sun.glass.ui.win.WinApplication$$Lambda$37/1146743572.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:745)
    Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
      at javafxapplication2.FXMLExecutionChartController$3.handle(FXMLExecutionChartController.java:263)
      at javafxapplication2.FXMLExecutionChartController$3.handle(FXMLExecutionChartController.java:241)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
      at javafx.event.Event.fireEvent(Event.java:198)
      at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3437)
      at javafx.scene.Scene$ClickGenerator.access$7900(Scene.java:3365)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3733)
      at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3452)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1728)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2461)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:348)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:273)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:382)
      at com.sun.glass.ui.View.handleMouseEvent(View.java:553)
      at com.sun.glass.ui.View.notifyMouse(View.java:925)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102)
      at com.sun.glass.ui.win.WinApplication$$Lambda$37/1146743572.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:745)
    Class Information:
    //Call to the Line chart graph
    n.setOnMouseClicked(new EventHandler<MouseEvent>()
                    @Override
                    public void handle ( MouseEvent e )
                        String s1 = dt.getXValue();
                        String s = s1.trim();
                        if ( baseHash.containsKey(s) )
                            String value = (String) baseHash.get(s);
                            String hashValue = value.substring(6, 38);
                            System.out.println(hashValue);
                            FXMLLineChartController.setHash(hashValue);
                             try
                                  lineTab .setText("Line Graph (Rows Read)");
                                  lineTab.setContent(FXMLLoader.load(getClass().getResource("/javafxapplication2/FXMLLineChart.fxml")));
                                  Node aNode = (Node) e.getSource();
                                  Scene scene = aNode.getScene();
                                  thisTabPane = (TabPane) scene.lookup("#tabPane");
                                  thisTabPane.getTabs().add(lineTab);
                                  selectionModel.selectLast();
                                  //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
                              catch ( IOException ex )
                                  Logger.getLogger(FXMLWrittenChartController.class.getName()).log(Level.SEVERE, null, ex);
    //Line Chart controller
    //Create the Graph
        @FXML
        private LineChart barChart;
    public void populateGraph ()
            System.out.println("Populate graph Line Chart");
            final CategoryAxis xAxis = new CategoryAxis();
            final NumberAxis yAxis = new NumberAxis();
            ObservableList<XYChart.Series<String, Number>> barChartData = FXCollections.observableArrayList();
            barChartData.clear();
            baseHash.clear();
            xAxis.setLabel("Query");
            yAxis.setLabel("Number of Executions");     
            series1.setName("Data from User DB2 for Query " +getHash() );
            for ( int i = 0; i < userLine.size(); i++ )
                    System.out.println(getHash() + " Usersize = " + userLine.size() + " base size " +baseLine.size());
                    series1.getData().add(new XYChart.Data<String, Number>(userLine.get(i).getBuildNumber(), (userLine.get(i).getDYN_Num_Executions())));
            barChartData.add(series1);
            barChart.setData(barChartData);

    Hi all,
    I am wondering can anybody help with this problem.
    I have an application that can create a new tab when the LineChart FXML view is called by way of onMouseClicked event from a bar graph (using scenebuilder). However, I need this Line chart to update when the user clicks a new bar on the bar graph page to show this new data.
    Initially the Line chart tab will open and display data from the first bar graph click and when I click another bar in Tab A (bar chart) if it has the same number of rows it will refresh the LineChart tab otherwise I get an error. Then if I try to load another line graph tab using a different bar graph as the source I get a child duplication error
    (So tab A has a bar graph that calls tab B to represent data as a line graph, however it wont do it more then once when there is a different number of points to show)
    (Also tab C, another Bar chart will not load a new tab) Exceptions below & Class detail below.
    I am using clear() to empty the observable list I have which is used to populate the graph and table before it reads in the new data values
    What is the proper way/ best way to dynamically add another tab and update the chart in the tab with new values? Any help would be appreciated.
    I am getting the following exceptions:
    Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: Index: 11, Size: 7
      at java.util.ArrayList.rangeCheckForAdd(ArrayList.java:661)
      at java.util.ArrayList.add(ArrayList.java:473)
      at com.sun.javafx.collections.ObservableListWrapper.doAdd(ObservableListWrapper.java:101)
      at javafx.collections.ModifiableObservableListBase.add(ModifiableObservableListBase.java:151)
      at com.sun.javafx.collections.VetoableListDecorator.add(VetoableListDecorator.java:320)
      at com.sun.javafx.scene.control.skin.TabPaneSkin$TabHeaderArea.addTab(TabPaneSkin.java:854)
      at com.sun.javafx.scene.control.skin.TabPaneSkin$TabHeaderArea.access$500(TabPaneSkin.java:659)
      at com.sun.javafx.scene.control.skin.TabPaneSkin.addTabs(TabPaneSkin.java:276)
      at com.sun.javafx.scene.control.skin.TabPaneSkin.lambda$initializeTabListener$463(TabPaneSkin.java:357)
      at com.sun.javafx.scene.control.skin.TabPaneSkin$$Lambda$108/885312968.onChanged(Unknown Source)
      at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
      at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
      at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
      at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
      at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
      at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
      at javafx.collections.ModifiableObservableListBase.add(ModifiableObservableListBase.java:155)
      at java.util.AbstractList.add(AbstractList.java:108)
      at javafxapplication2.FXMLExecutionChartController$3.handle(FXMLExecutionChartController.java:262)
      at javafxapplication2.FXMLExecutionChartController$3.handle(FXMLExecutionChartController.java:241)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
      at javafx.event.Event.fireEvent(Event.java:198)
      at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3437)
      at javafx.scene.Scene$ClickGenerator.access$7900(Scene.java:3365)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3733)
      at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3452)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1728)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2461)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:348)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:273)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:382)
      at com.sun.glass.ui.View.handleMouseEvent(View.java:553)
      at com.sun.glass.ui.View.notifyMouse(View.java:925)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102)
      at com.sun.glass.ui.win.WinApplication$$Lambda$37/1146743572.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:745)
    Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
      at javafxapplication2.FXMLExecutionChartController$3.handle(FXMLExecutionChartController.java:263)
      at javafxapplication2.FXMLExecutionChartController$3.handle(FXMLExecutionChartController.java:241)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
      at javafx.event.Event.fireEvent(Event.java:198)
      at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3437)
      at javafx.scene.Scene$ClickGenerator.access$7900(Scene.java:3365)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3733)
      at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3452)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1728)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2461)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:348)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:273)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:382)
      at com.sun.glass.ui.View.handleMouseEvent(View.java:553)
      at com.sun.glass.ui.View.notifyMouse(View.java:925)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102)
      at com.sun.glass.ui.win.WinApplication$$Lambda$37/1146743572.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:745)
    Class Information:
    //Call to the Line chart graph
    n.setOnMouseClicked(new EventHandler<MouseEvent>()
                    @Override
                    public void handle ( MouseEvent e )
                        String s1 = dt.getXValue();
                        String s = s1.trim();
                        if ( baseHash.containsKey(s) )
                            String value = (String) baseHash.get(s);
                            String hashValue = value.substring(6, 38);
                            System.out.println(hashValue);
                            FXMLLineChartController.setHash(hashValue);
                             try
                                  lineTab .setText("Line Graph (Rows Read)");
                                  lineTab.setContent(FXMLLoader.load(getClass().getResource("/javafxapplication2/FXMLLineChart.fxml")));
                                  Node aNode = (Node) e.getSource();
                                  Scene scene = aNode.getScene();
                                  thisTabPane = (TabPane) scene.lookup("#tabPane");
                                  thisTabPane.getTabs().add(lineTab);
                                  selectionModel.selectLast();
                                  //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
                              catch ( IOException ex )
                                  Logger.getLogger(FXMLWrittenChartController.class.getName()).log(Level.SEVERE, null, ex);
    //Line Chart controller
    //Create the Graph
        @FXML
        private LineChart barChart;
    public void populateGraph ()
            System.out.println("Populate graph Line Chart");
            final CategoryAxis xAxis = new CategoryAxis();
            final NumberAxis yAxis = new NumberAxis();
            ObservableList<XYChart.Series<String, Number>> barChartData = FXCollections.observableArrayList();
            barChartData.clear();
            baseHash.clear();
            xAxis.setLabel("Query");
            yAxis.setLabel("Number of Executions");     
            series1.setName("Data from User DB2 for Query " +getHash() );
            for ( int i = 0; i < userLine.size(); i++ )
                    System.out.println(getHash() + " Usersize = " + userLine.size() + " base size " +baseLine.size());
                    series1.getData().add(new XYChart.Data<String, Number>(userLine.get(i).getBuildNumber(), (userLine.get(i).getDYN_Num_Executions())));
            barChartData.add(series1);
            barChart.setData(barChartData);

Maybe you are looking for