NPEs in JavaFX

JavaFX allows dereferencing into nulls, where with Java you would get a NullPointerException. To my way of thinking highlighting NPEs improves code - as it points the way to specific programmer oversights. So my question is - is it possible to have NullPointerExceptions even when coding in JavaFX?
example:
someVar.getName() [if someVar was null then in Java you would get a NPE]

Not having NPEs makes me a less productive programmer :-( This is the one aspect of the JavaFX language that could, I think, be improved. My bugs very often appear not where they really happen, but sometime after. I find myself frequently having to code Assert.notNull( ref) a few times (ie. Assert.notNull( ref.ref) etc. as well) to trace back to where the actual problem is.
Perhaps a modification to the language would help? How about a keyword, say 'npe' or 'dud' (or even 'null' as it is supeflous at the moment right?) When you initialise a var with our new keyword then ref access is not generated like this:
(ref != null) ref.funcall()
, but like this:
ref.funcall()
Then the IDE could have a warning to keep people like me happy. The warning wouldn't happen as long as I coded like this:
var someRef = npe;
(The warning wouldn't happen for sequences which always get generated on the fly, which seems to be a good thing.)
- Chris Murphy

Similar Messages

  • NPE in JavaFX compiler for bound function

    The following bound function:
    -- cut here --
    bound function buttonLocation(count) : Integer {
    if (count == 0)
    return 30
    else
    return 10 + (20 * count)
    -- cut here --
    is giving a NPE using NB 6.8 M2 as:
    - file 1.2.1_b28
    - and if possible, the source file which triggered this problem.
    Thank you.
    if (count == 0)
    An exception has occurred in the OpenJavafx compiler. Please file a bug at the Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues) after checking for duplicates. Include the following diagnostic in your report and, if possible, the source code which triggered this problem. Thank you.
    java.lang.NullPointerException
    at com.sun.tools.javafx.comp.JavafxToBound.translate(JavafxToBound.java:143)
    at com.sun.tools.javafx.comp.JavafxToBound.translateForConditional(JavafxToBound.java:158)
    at com.sun.tools.javafx.comp.JavafxToBound.visitIfExpression(JavafxToBound.java:1168)
    at com.sun.tools.javafx.tree.JFXIfExpression.accept(JFXIfExpression.java:48)
    at com.sun.tools.javafx.comp.JavafxToBound.translate(JavafxToBound.java:174)
    at com.sun.tools.javafx.comp.JavafxToBound.visitBlockExpression(JavafxToBound.java:531)
    at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
    at com.sun.tools.javafx.comp.JavafxToBound.translate(JavafxToBound.java:174)
    at com.sun.tools.javafx.comp.JavafxToBound.translateAsResult(JavafxToBound.java:149)
    at com.sun.tools.javafx.comp.JavafxToBound.translateAsLocation(JavafxToBound.java:139)
    at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.methodBody(JavafxToJava.java:2220)
    at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.doit(JavafxToJava.java:2279)
    at com.sun.tools.javafx.comp.JavafxToJava.visitFunctionDefinition(JavafxToJava.java:2292)
    at com.sun.tools.javafx.tree.JFXFunctionDefinition.accept(JFXFunctionDefinition.java:93)
    at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
    at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:509)
    at com.sun.tools.javafx.comp.JavafxToJava.visitClassDeclaration(JavafxToJava.java:1261)
    at com.sun.tools.javafx.tree.JFXClassDeclaration.accept(JFXClassDeclaration.java:141)
    at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
    at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:521)
    at com.sun.tools.javafx.comp.JavafxToJava.visitScript(JavafxToJava.java:1147)
    at com.sun.tools.javafx.tree.JFXScript.accept(JFXScript.java:89)
    at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
    at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:517)
    at com.sun.tools.javafx.comp.JavafxToJava.toJava(JavafxToJava.java:691)
    at com.sun.tools.javafx.main.JavafxCompiler.jfxToJava(JavafxCompiler.java:728)
    at com.sun.tools.javafx.main.JavafxCompiler.jfxToJava(JavafxCompiler.java:699)
    at com.sun.tools.javafx.main.JavafxCompiler.compile2(JavafxCompiler.java:785)
    at com.sun.tools.javafx.main.JavafxCompiler.compile(JavafxCompiler.java:685)
    at com.sun.tools.javafx.main.Main.compile(Main.java:624)
    at com.sun.tools.javafx.main.Main.compile(Main.java:312)
    at com.sun.tools.javafx.Main.compile(Main.java:84)
    at com.sun.tools.javafx.Main.main(Main.java:69)
    ERROR: javafxc execution failed, exit code: 4
    Known issue ?

    Hi Sandeep,
    Thanks a lot for your quick reply! You were right, the logging directive was used both client and server side. I moved
    -Djava.util.logging.config.file=path/to/logging.propertiesfrom setDomainEnv.cmd to startWeblogic.cmd and WLS can be stopped correctly now.
    Regards,
    Bas

  • JavaFX script programming language - several questions

    Which are the min/max values I can pass to an Integer/Number? Does Integer use java.lang.Integer internally? And what if the variable overflows? Does it automatically expand java.lang.Long?
    In an article I read the def keyword is the equivalent of marking a variable as final in Java but to me, it looks like it's more like const in C.
    Does JavaFX have checked exceptions?
    Sadly, this is what the Language Reference says:
    [To do: write chapter]

    Integer = 32-bit signed integer value = java.lang.Integer
    Number = Simple (was double in 1.0) precision floating-point number = java.lang.Float
    Note since v.1.1 you have also Character, Byte, Short, Long, Float, Double types, mapping to same types in Java.
    Overflow: just test it... :-) I doubt it will change size.
    I am unsure of the differences between Java's final and C's const. But basically, def makes a variable immutable (cannot change the object associated to it, but the object itself can change internally).
    JavaFX has no checked exceptions (unless using a Java API with such exception, I think), you will even have hard time to make a NPE...

  • Which perfomance improvements will JavaFX 8 deliver to us?

    Hi there,
    my whole company consists already of fans of JavaFX 2 - it's fun to work with it and slowly but steady, the team seems solves on the most annoying bugs. But one thing in the 2.x versions seems to be a problem for us. Even on recommended combinations of hard- and software, performance isn't really predicable yet. Sometimes, our applications perform well on 2-year old hardware while we have issues using high-end desktop components. Generally, i think that there is some potential to improve the performance of JavaFX.
    For example, i read in Jira that the developers where thinking of pre-rendering nodes as bitmaps and cache those to gain some performance wins. I didn't find this discussion again, but i think that this hasn't been implemented yet.
    So what i really would like to know is if there are upcoming performance improvements in JavaFX 8 and if the answer is yes, what will they look like?
    Best regards,
    David
    Edited by: TheJeed on 04.02.2013 02:49

    There are some preliminary performance numbers for JavaFX 8:
    http://fxexperience.com/2012/09/preliminary-performance-numbers-in-javafx-8/
    The fxexperience post also includes descriptions of some of the work to improve performance in JavaFX8.
    Also there is a note on memory consumption:
    I would have to check our performance numbers to be certain, but I believe actually we have also reduced
    the memory usage over the same period, primarily due to making Control a Region and removing one extra
    node for most Controls (for example, a Button is now a Button -> Text, instead of Button -> StackPane -> Text).I think some of the major work involves allowing the JavaFX rendering thread and JavaFX application thread to execute concurrently.
    i read in Jira that the developers where thinking of pre-rendering nodes as bitmaps and cache those
    to gain some performance wins.
    I didn't find this discussion again, but i think that this hasn't been implemented yet. Perhaps it has. Have you tried out the Node setCache and setCacheHint APIs?
    http://docs.oracle.com/javafx/2/api/javafx/scene/Node.html#setCache%28boolean%29
    http://docs.oracle.com/javafx/2/api/javafx/scene/Node.html#setCacheHint%28javafx.scene.CacheHint%29
    Additionally, you can manually do this by using node.snapshot and then rendering the resulting image in an ImageView rather than the original node.
    http://docs.oracle.com/javafx/2/api/javafx/scene/Node.html#snapshot%28javafx.scene.SnapshotParameters,%20javafx.scene.image.WritableImage%29
    Depending on the usage situation, the caching APIs can make a huge difference to application performance.
    Running a grep for the word performance on the JavaFX 8 issue tracker gave =>
    RT-5130     Mechanism to report FPS of an arbitrary app (app doesn't call PerformanceTracker) in Prism
    RT-5475     RT-5474 Optimize picking performance
    RT-6475     Need new hints to control how Text node is rendered
    RT-8037     Need to complete a temporarily performance fix on filter effects (DropShadow, InnerShadow and SepiaTone)
    RT-8243     Memory Leak (sun.awt.geom.CurveLink)
    RT-10753     prism-sw: ColorfulCircle bm performance drop in case circle radius is equal 2 or 4 for Inner & Outer Stroke positions
    RT-13324     Text needs to support letter spacing
    RT-13365     poor performance running "colorful circles"
    RT-14065     DirtyRegions: different performance results for equivalent dirty regions
    RT-14122     Camera Style Transform
    RT-14867     b35: 20% (-2.47 fps) performance regression in TextBox-text100k run with hw pipeline comparing to b34
    RT-15566     too big area repainted if the test updates more than 12 checkboxes
    RT-15687     TreeItem expand/collapse performance in hardware pipeline is almost 20 fps worse than in j2d pipeline
    RT-16725     API to manipulate scrollbar on TableView
    RT-16853     TextArea: performance issue
    RT-16924     WebNode reload test can't work in sandbox mode
    RT-17510     Improve performance of rendering a TRANSPARENT stage on Windows 7
    RT-17551     MacOS: Optimize using of lockFocusIfCanDraw
    RT-17960     Transparent stage resize flickers on Mac
    RT-18067     fx2.1-15 (b01): up to 90% regression in Controls.TextArea-select_all-255x1000 in j2d pipeline
    RT-18354     Animation perform down observably when i add the dropdown effect to root
    RT-18612     Glass Mac: ClipboardAssistance.actionPerformed()
    RT-19106     LCD text blending isn't accounting for over-lapping glyphs.
    RT-19271     J2D pipeline does not implement proper handling of the subimage "isolate mask" control
    RT-19305     Animation performance may be very unstable on Mac
    RT-19605     The fix for RT-19532 results in 65% (317 fps) performance regression in Controls.Buttons-adhoc-mouse-nodes1008-skipAll in fx2.1-controls-scrum-b345 build
    RT-20356     PresentingPainter and UploadingPainter disregarding dirty clip rect
    RT-20405     Improve Path rendering performance
    RT-20475     Allow to select videocard (or choose the best one automatically)
    RT-20616     TreeView creates new cells every time root is changed
    RT-20978     fx2.2-graphics-scrum-h175: performance regression on Mac (initially 50% but now unknown)
    RT-21672     Implement Occlusion Culling
    RT-22076     CSS: Treat style class as a bit mask in Selector for better performance on selector matching.
    RT-22244     Pisces Renderer shows huge performance win when coded in C
    RT-22422     Cannot sign JAR files
    RT-22567     Minor tweaks to FX/Swing painting
    RT-22913     Implement and enable accelerated compositing to improve WebView rendering performance
    RT-23413     FXMLLoader should be able to cache imports and properties between to load() calls
    RT-23450     Improve performance of Prism rendering and clipping
    RT-23458     Improve ellipses performance
    RT-23459     Reduce node count in Controls by allowing a Skin to manipulate the Control's children and layout directly
    RT-23463     Implement Region image based caching
    RT-23467     Evaluate Native Text Engines
    RT-23469     Analyze Layout Performance
    RT-23562     Optimize Region by using immutable State, caching on CSS level
    RT-23574     Add support for tiled rendering of textures (both for performance and functional reasons)
    RT-23582     Update Caspian CSS to use better performing selectors
    RT-23588     Investigate using less precise but faster min, pref, max size computations for controls
    RT-23616     Avoid processing CSS for VirtualFlow cells that are CSS clean
    RT-23621     Check use of HIGHP with es shaders.
    RT-23704     Use DirectX 9Ex mechanism to avoid calling cv.save()
    RT-23725     Beagleboard: Execute fragment shader on the GPU causes significant drop in performance
    RT-23738     fx3.0-graphics-scrum-h45: Webkit synchronization for 3.0 caused -55% performance regression in WebNode.ColorfulShapes-Blur2Circle
    RT-23743     Evaluate the performance of computing and uploading individual glyphs one at a time versus in a batch
    RT-23746     Consider optimizing libjepg for performance rather than quality (using already existing build flags)
    RT-23773     Improve caspian.css to use child selectors where possible, rather than require css engine to perform needless busy-work
    RT-23839     Lists,Trees and Tables do not work with wrapped text
    RT-23873     Investigate (and improve) ListView / TreeView / TableView performance
    RT-23879     Mac: Clicking in a Popup/ContextMenu/ComboBox steals the focus from the primary stage in applet
    RT-23905     SQE: Provide JavaFX CSS3 support
    RT-23913     SQE: Optional FX Packages
    RT-24010     WebNode.GUIMark2-Vector fails with NullPointerException in multithreaded mode
    RT-24012     Text performance of the hardware pipeline must be equal or better than the software pipeline
    RT-24013     Multi-Core scalability
    RT-24017     3.0-controls-scrum-58: 100% regression in NodeMemory.TreeItem and 96% in Controls.TreeView-Expand
    RT-24018     3.0-controls-scrum-60: Controls.ListView-Keyboard and Controls.TableView-Keyboard benchmarks are broken
    RT-24143     Ant task fx:deploy expectes all JARs to have a MANIFEST.MF and fails with NPE if at least one doesn't
    RT-24148     Private controls Weak* classes should clean up in more situations
    RT-24298     3.0-graphics-scrum-h142: memory usage of ColorfulShapes.Blur2Circle-Transparent has been increased by 625% (246,890.67 kb)
    RT-24320     WebView draws entire back buffer on screen upon every repaint
    RT-24437     X11Pixels and LensPixels are ill-implemented wrt managing the native object
    RT-24480     Use FilteredList for Parent.unmodifiableManagedChildren
    RT-24557     ImagePattern is slow on embedded systems
    RT-24582     High frequency refresh and Heavy but low priority updates in the same app (multithreading render, multiinstance...)
    RT-24587     Changing a single child of FlowLayout is slower than changing all children
    RT-24624     prism-sw pipeline is up to 90% worse than j2d pipeline
    RT-24741     WebView is not using accelerated compositing for http://javaweb.sfbay.sun.com/~epavlova/Performance/JavaFX2/mexsantos opacity transitions
    RT-24965     8.0-graphics-scrum-h82: Controls.TableView-XmasTree and DirtyArea performance regressions caused by RT-23725 fix.
    RT-24966     8.0-graphics-scrum-h99: up to 30% regression in Guimark2.Bitmap
    RT-24992     8.0-controls-scrum-h51: Controls.CheckBox and Controls.RadioButton benchmarks are broken
    RT-24997     8.0-controls-scrum-h44: up to 35% regression in Controls.TableView and Controls.Buttons benchmarks
    RT-25036     8.0-h26-b56: Controls.TableView-XmasTree benchmark crashes with SIGSEGV on MacOS in sw pipeline
    RT-25078     Mac: dirChooser.showDialog() returns immediately "null" but somehow remains open and appears to work (...when being executed from a Button onAction Eventhandler in new Stage)
    RT-25118     8.0-controls-scrum-h51: -23% performance regression in Controls.TreeView-Expand.adhoc-items1000-wide benchmark
    RT-25120     8.0-graphics-scrum-h99: up to -24% performance regression in Controls.ListView and Controls.TableView
    RT-25166     Path updates in a ScrollPane where content has a Scale transform are 100 times slower
    RT-25233     Javafx applet with preloader crashes under Windows / Java7u7 / Chrome
    RT-25350     poor animation performance on PathTransition when part of the Stage sits outside of desktop screen
    RT-25382     8.0-h38-b58: up to 30% performance regression in Image rendering in sw pipeline
    RT-25403     8.0-h38-b58: 67% (-21.7 fps) performance regression in Charts.Bubble in hw pipeline on MacOS-Low end machines
    RT-25486     Debian policy requirement for 'Installed-Size' not set -- users get warning when installing: NetBeans built JavaFX .deb package for Ubuntu
    RT-25684     GridPane.layoutChildren() hangs when wrapText is true
    RT-25685     GridPane.layoutChildren() hangs when wrapText is setup in CSS style class
    RT-25801     8.0-controls-scrum-h81: 25% performance regression in Controls.RadioButton on mac-low end machine
    RT-25864     New "shared textures" do not share pixel update flags as well as they should
    RT-25919     8.0-graphics-scrum-h242: 48% (16.70 fps) performance regression in GUIMark2.Bitmap on MacOS
    RT-26024     Scene Builder hangs when adding column
    RT-26113     8.0-graphics-scrum-h278: disabled accessibility feature triggers dependency on uiautomationcore.dll
    RT-26140     Node Orientation - API issue: Should effective orientation be a property?
    RT-26221     8.0-graphics-scrum-h276: 33% regression in NodeMemory.TableColumn-rendering-on benchmark
    RT-26438     8.0-graphics-scrum-h342: up to 30% of memory usage increase in bunch of performance benchmarks
    RT-26537     8.0-graphics-scrum-349: deadloack in WebNode.GUIMark2-Bitmap benchmark
    RT-26702     Poor DisplacementMap effect performance on Mac
    RT-26716     Performance of scrolling TreeView tail is much more slowly when scrolling TreeView head
    RT-26894     String rendering is less performant than java2D one
    RT-26909     Regions are being cached even when extremely tall
    RT-26999     8.0-controls-scrum-h122: up to 20% regression in some Controls.TableView benchmarks
    RT-27073     8.0-graphics-scrum-h458: more than 50% regression in Controls.TextField benchmark
    RT-27079     8.0-graphics-scrum-h449: RT-25055 caused up to 80% regression in Charts.Bubble benchmark
    RT-27111     8.0-controls-scrum-h138: up to 30% regression in Controls.TreeViewExpand benchmarks
    RT-27143     8.0-graphics-scrum-h471: TableView-Keyboard fails with NullPointerException
    RT-27508     8.0-h96-b68: 68% regression in SpiralText in hw pipeline caused by enabling DirectX 9Ex
    RT-27667     [TreeTableView] Multiple cell selection issue.
    RT-27982     Mac: 8.0-graphics-scrum-h595: JavaFX crashes on MacOS
    RT-27985     8.0-graphics-scrum-h595: 42% performance regression in Guimark2.BitmapCanvas on Windows-Mid-Range machine
    RT-28064     A new Scene accumulates all PointLight's from previous Scene's     

  • TableView NPE

    Hi,
    FYI, and NPE in a table:
    java.lang.NullPointerException
         at javafx.scene.control.TableView$TableViewArrayListSelectionModel.isSelected(TableView.java:2095)
         at javafx.scene.control.TableView$TableViewArrayListSelectionModel.isSelected(TableView.java:2080)
         at javafx.scene.control.TableRow.updateSelection(TableRow.java:237)
         at javafx.scene.control.TableRow.access$100(TableRow.java:37)
         at javafx.scene.control.TableRow$1.invalidated(TableRow.java:65)
         at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:140)
         at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:64)
         at javafx.beans.property.ReadOnlyIntegerWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyIntegerWrapper.java:154)
         at javafx.beans.property.ReadOnlyIntegerWrapper.fireValueChangedEvent(ReadOnlyIntegerWrapper.java:120)
         at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:89)
         at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:122)
         at javafx.scene.control.IndexedCell.updateIndex(IndexedCell.java:91)
         at com.sun.javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1366)
         at com.sun.javafx.scene.control.skin.VirtualFlow.addLeadingCells(VirtualFlow.java:875)
         at com.sun.javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:831)
         at com.sun.javafx.scene.control.skin.VirtualFlow.setCellCount(VirtualFlow.java:174)
         at com.sun.javafx.scene.control.skin.TableViewSkin.updateRowCount(TableViewSkin.java:604)
         at com.sun.javafx.scene.control.skin.TableViewSkin.layoutChildren(TableViewSkin.java:397)
         at javafx.scene.Parent.layout(Parent.java:900)
         at javafx.scene.Parent.layout(Parent.java:910)
         at javafx.scene.Parent.layout(Parent.java:910)
         at javafx.scene.Scene.layoutDirtyRoots(Scene.java:451)
         at javafx.scene.Scene.doLayoutPass(Scene.java:424)
         at javafx.scene.Scene.access$2800(Scene.java:132)
         at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:1750)
         at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:292)
         at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:398)
         at com.sun.javafx.tk.quantum.QuantumToolkit$10.run(QuantumToolkit.java:330)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
         at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
         at java.lang.Thread.run(Thread.java:722)

    Hi,
    Yes, apologies. There is nothing fancy about what I do, a simple table with data added to it.
    It only happens when I click (select) a row, on the next update, this npe happens. I think it is outside my code.
    A small snippet would be fairly hard to implement.....

  • NPE in initialize

    Hi,
    After reading introduction_to_fxml I got an impression that an initialize method can be used as spring's afterPropertiesSet or EJB's a @PostConstruct method - that is expected all member variable set when it is invoked. But when I tried I got NPE. The code I tried looks like following.
    Main app:
    public class MyApp extends Application {
        @Override
        public void start(Stage stage) throws Exception {
            Parent root = FXMLLoader.load(getClass().getResource("/myapp.fxml"));///MAIN LOAD
            Scene scene = new Scene(root, 320, 240);
            scene.getStylesheets().add("/myapp.css");
            stage.setScene(scene);
            stage.setTitle("my app");
            stage.show();
        public static void main(String[] args) { launch(); }
    }myapp.fxml:
    <VBox fx:id="root" xmlns:fx="http://javafx.com/fxml" >
           <ControlA>
               <SomeClass>      
               </SomeClass>
           </ControlA>
    </VBox>SomeClass.java:
    @DefaultProperty("aproperty")
    public class ControlA extends StackPane {
       private SomeClass aproperty;
         public ContentPane(){
            try {
                FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/controls/ControlA.fxml"));
                fxmlLoader.setRoot(this);
                fxmlLoader.setController(this);
                fxmlLoader.load();//ControlA LOAD
            } catch (IOException exception) {
                throw new RuntimeException(exception);
        public void initialize() {
             //aproperty is null here, called from ControlA LOAD
       //aproperty get/set
       public void setAproperty(SomeClass p){//it is called from MAIN LOAD
    }The component's initialize method is called from its load method and its property is being set from parent's load method which is called later. And it looks understandable, a component's property values can't be constructed until parent fxml is read. But if so, what is best practice to init a component before it will be used and after all the props were initialized?
    Best regards, Eugene.

    Hi Eugene,
    I would perform the initialization steps that do not depend on the value of A property in initialize(), and perform the initialization steps that depend on the value of A property whenever that value is changed.
    If A is a simple bean property - that would probably mean doing part of the initialization in the setter for A. If A is an observable property, then you could register a ChangeListener (or InvalidationListener) on A in initialize - and defer the initialization/set up of everything that depends on the value of A to that listener.
    Hope this helps,
    -- daniel

  • How to change default open and close effect in JavaFX TabPane

    I'm interested how I can change the default effect of closing and opening a tab in JavaFX TabPAne. I found that this can be configured by using:
        tabPane.setEffect(Effect ????);
    But which effects are available?

    Hi Lionate
    Welcome to the forum.
    Make a document to your liking.
    Change the Body style and any other styles in :
    +Menu > Show Styles Drawer > click on the little triangle next to Body > redefine Style from Selection+
    Capture the page:
    +Menu > Format > Advanced > Capture Pages… > Name it > OK+
    +Menu > Format > Advanced > Manage Pages… > Delete other Sections/Pages > OK+
    Save as a template:
    +Menu > File > Save as Template…+
    +Menu > Pages > Preferences > General Preferences > For New Documents > click Use template: > Choose > browse to the template above+
    Peter

  • 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.

  • What is equivalent of JInternalFrame in JavaFX 2.0?

    what is equivalent of JInternalFrame in JavaFX 2.0?
    Actually I want to use pure javaFX 2.0 to view report created in iReport 5.0.0.
    I have used java.swing code, and now I want to use pure javaFX 2.0.
    My code in swing is as follows
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package reports;
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.util.HashMap;
    import net.sf.jasperreports.engine.JRException;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.view.JRViewer;
    * @author TANVIR AHMED
    public class ReportsViewer extends javax.swing.JInternalFrame {
    * Creates new form MyiReportViewer
    private ReportsViewer()
    super("Report Viewer",true,true,true,true);
    initComponents();
    setBounds(10,10,600,500);
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    public ReportsViewer(String fileName)
    this(fileName,null);
    public ReportsViewer(String fileName,HashMap parameter)
    this();
    try
    /* load the required JDBC driver and create the connection
    here JDBC Type Four Driver for MySQL is used*/
    //Class.forName("com.mysql.jdbc.Driver");
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", "invoice", "item");
    //Connection con=DriverManager.getConnection("jdbc:mysql://localhost/inventory","root","karim");
    /*(Here the parameter file should be in .jasper extension
    i.e., the compiled report)*/
    JasperPrint print = JasperFillManager.fillReport(
    fileName, parameter, con);
    JRViewer viewer=new JRViewer(print);
    Container c=getContentPane();
    c.setLayout(new BorderLayout());
    c.add(viewer);
    catch(SQLException sqle)
    sqle.printStackTrace();
    catch(JRException jre)
    jre.printStackTrace();
    * This method is called from within the constructor to initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is always
    * regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 394, Short.MAX_VALUE)
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 290, Short.MAX_VALUE)
    pack();
    }// </editor-fold>
    // Variables declaration - do not modify
    // End of variables declaration
    and
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package reports;
    import java.beans.PropertyVetoException;
    * @author TANVIR AHMED
    public class MainUI extends javax.swing.JFrame {
    * Creates new form MainUI
    public MainUI() {
    super("REPORTS");
    initComponents();
    setSize(java.awt.Toolkit.getDefaultToolkit().getScreenSize());
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    jMenuItem1 = new javax.swing.JMenuItem();
    desktopPane = new javax.swing.JDesktopPane();
    salesTaxInv = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    supplyRegister = new javax.swing.JButton();
    PartyLedger = new javax.swing.JButton();
    menuBar = new javax.swing.JMenuBar();
    jMenuItem1.setText("jMenuItem1");
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    desktopPane.setBackground(new java.awt.Color(255, 204, 0));
    desktopPane.setBorder(new javax.swing.border.MatteBorder(null));
    desktopPane.setForeground(new java.awt.Color(255, 0, 102));
    desktopPane.setAutoscrolls(true);
    desktopPane.setFont(new java.awt.Font("Bookman Old Style", 0, 14)); // NOI18N
    desktopPane.setPreferredSize(new java.awt.Dimension(1024, 768));
    salesTaxInv.setBackground(new java.awt.Color(255, 255, 255));
    salesTaxInv.setFont(new java.awt.Font("Bookman Old Style", 1, 18)); // NOI18N
    salesTaxInv.setForeground(new java.awt.Color(204, 0, 0));
    salesTaxInv.setText("Sales Tax Invoice");
    salesTaxInv.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    salesTaxInvActionPerformed(evt);
    salesTaxInv.setBounds(20, 53, 200, 31);
    desktopPane.add(salesTaxInv, javax.swing.JLayeredPane.DEFAULT_LAYER);
    jLabel1.setFont(new java.awt.Font("Bookman Old Style", 0, 24)); // NOI18N
    jLabel1.setForeground(new java.awt.Color(50, 72, 255));
    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel1.setText("Invoice System Reports");
    jLabel1.setBounds(0, -1, 1024, 50);
    desktopPane.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);
    supplyRegister.setFont(new java.awt.Font("Bookman Old Style", 1, 18)); // NOI18N
    supplyRegister.setForeground(new java.awt.Color(204, 0, 0));
    supplyRegister.setText("Supply Register");
    supplyRegister.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    supplyRegisterActionPerformed(evt);
    supplyRegister.setBounds(20, 100, 200, 30);
    desktopPane.add(supplyRegister, javax.swing.JLayeredPane.DEFAULT_LAYER);
    PartyLedger.setFont(new java.awt.Font("Bookman Old Style", 1, 18)); // NOI18N
    PartyLedger.setForeground(new java.awt.Color(204, 0, 0));
    PartyLedger.setText("Party Ledger");
    PartyLedger.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    PartyLedgerActionPerformed(evt);
    PartyLedger.setBounds(20, 140, 200, 30);
    desktopPane.add(PartyLedger, javax.swing.JLayeredPane.DEFAULT_LAYER);
    setJMenuBar(menuBar);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(desktopPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    pack();
    }// </editor-fold>
    private void salesTaxInvActionPerformed(java.awt.event.ActionEvent evt) {                                           
    try
    ReportsViewer myiReportViewer = new ReportsViewer("reports/INV.jasper");
    myiReportViewer.setBounds(0, 0, desktopPane.getWidth(), desktopPane.getHeight());
    myiReportViewer.setVisible(true);
    desktopPane.add(myiReportViewer);
    myiReportViewer.setSelected(true);
    catch (PropertyVetoException pve)
    pve.printStackTrace();
    private void supplyRegisterActionPerformed(java.awt.event.ActionEvent evt) {                                              
    try
    ReportsViewer myiReportViewer = new ReportsViewer("reports/supplyRegister.jasper");
    myiReportViewer.setBounds(0, 0, desktopPane.getWidth(), desktopPane.getHeight());
    myiReportViewer.setVisible(true);
    desktopPane.add(myiReportViewer);
    myiReportViewer.setSelected(true);
    catch (PropertyVetoException pve)
    pve.printStackTrace();
    private void PartyLedgerActionPerformed(java.awt.event.ActionEvent evt) {                                           
    try
    ReportsViewer myiReportViewer = new ReportsViewer("reports/CustomerLedger.jasper");
    myiReportViewer.setBounds(0, 0, desktopPane.getWidth(), desktopPane.getHeight());
    myiReportViewer.setVisible(true);
    desktopPane.add(myiReportViewer);
    myiReportViewer.setSelected(true);
    catch (PropertyVetoException pve)
    pve.printStackTrace();
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new MainUI().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton PartyLedger;
    private javax.swing.JDesktopPane desktopPane;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JButton salesTaxInv;
    private javax.swing.JButton supplyRegister;
    // End of variables declaration
    Best Regards

    Dear Sir,
    I am using the swing code and running the jasper report with the above code.
    Realy!
    I start the thread with this code
    @FXML
    private void mainUiButtonAction(ActionEvent event) {
    try{
    new MainUI().setVisible(true);
    catch(Exception ex){                 
    }

  • Can't run JavaFX app as a jar file from command line

    I'm trying to build a JavaFX app from scratch (that is, by including the jar file from the JavaFX SDK rather than by using the special JavaFX project type from NetBeans). It runs fine in NetBeans. However, when I try to launch it as a jar file from the command line (using "java -jar dist\TestApp") I get the following. Has anybody seen this before, and if so how can I fix it?:
    *** Fallback to Prism SW pipeline
    Exception in thread "main" java.lang.RuntimeException: java.lang.UnsatisfiedLink
    Error: Can't load library: C:\dev\TestApp\dist\bin\mat.dll
    at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:
    289)
    at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:68)
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherIm
    pl.java:145)
    at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:
    27)
    at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:97)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.UnsatisfiedLinkError: Can't load library: C:\dev\RedactionT
    oolPrototype\RedactionToolPrototype.Core\dist\bin\mat.dll
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.load0(Unknown Source)
    at java.lang.System.load(Unknown Source)
    at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoad
    er.java:155)
    at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoad
    er.java:85)
    at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:
    30)
    at com.sun.glass.ui.Application$1.run(Application.java:28)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.glass.ui.Application.loadNativeLibrary(Application.java:26)
    at com.sun.glass.ui.win.WinApplication.<clinit>(WinApplication.java:33)
    at com.sun.glass.ui.win.WinPlatformFactory.createApplication(WinPlatform
    Factory.java:20)
    at com.sun.glass.ui.win.WinPlatformFactory.createApplication(WinPlatform
    Factory.java:17)
    at com.sun.glass.ui.Application.Run(Application.java:51)
    at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:
    279)
    ... 5 more

    Unsatisfied link means that Java is trying to access a native library, but it cannot be found. As to why this error is being thrown, here is my guess:
    If you open up one of the sample jars with a zip viewer, you will see that the Manifest file has the following entries:
    >
    Manifest-Version: 1.0
    JavaFX-Version: 2.0
    implementation-vendor: Oracle
    implementation-title: BrickBreaker
    implementation-version: 1.0
    JavaFX-Application-Class: brickbreaker.Main
    Created-By: JavaFX Packager
    Main-Class: com/javafx/main/Main
    >
    In other words, a JavaFX project works a bit differently than a normal Java project. com/javafx/main/Main is used as the Main class and your "Main" class is called later.
    If you are trying to build this from a normal Java project, then com/javafx/main/Main will not be created and it will call your Main class right away. Thus, whatever setup is needed to run JavaFX will not occur.

  • 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);

  • How do I create a NetBeans project with multiple JavaFX (FXML) dialogs?

    I'm very new to Java and JavaFX, so forgive what is probably a question asked a thousand times, but I can't seem to find the answer.
    I come from a Visual Studio (C# with WPF) background. I'm used to creating a Solution then adding a Project for each dialog/window that gets included in the Solution. Each dialog/window is a class derived from Window, and I simply create an instance of that class when I need to use the dialog.
    What I need to do is have a main window (stage) that contains two lists of participants (a red team and a blue team).
    Then I need a separate dialog for entering the information for the participant. So when a button on the main stage is pressed ("Add Red Participant"), I want to open the ParticipantDialog. When the "OK" or "Close" button on the Participant dialog is clicked, I want the dialog to be able to return a participant object to the main stage.
    Then the main stage adds that participant to the appropriate list.
    What I've gathered so far is that I will be creating an FXML file for the Participant dialog (and I assume an associated controller). Then when the "Add" button is pressed, I will call an FXMLLoader to load that FXML dialog. Something like this:
    FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("ParticipantDialog.fxml"));
    Scene scene = (Scene)fxmlLoader.load();
    final Stage participantDialog = new Stage();
    participantDialog.setScene(scene);
    First question is: is that correct so far? Am I at least on the right track?
    Next question is: how or where do I create the FXML and controller files for the participant dialog using NetBeans? Should I create a separate project to make the participant dialog and then copy those files over, or is there a way to make the files within the parent project? And if I make the participant dialog in a separate project, what's the easiest way to access it from my main stage?
    I feel like I'm missing something simple here because this seems a lot harder than it should be.
    Thanks in advance for any advice.

    >  is that correct so far?
    Yes the sample code you have is fine to launch a new dialog when your Add button is pressed .
    > I create the FXML and controller files for the participant dialog using NetBeans?
    You can edit FXML text in NetBeans, but I think that is kind of tedious.
    You might want to create the FXML using SceneBuilder.
    You can use SceneBuilder in NetBeans.
    You may want to get it working without FXML first.
    For example, use the JavaFX scene graph API, then convert your program to use FXML once you are more comfortable with the JavaFX system.
    The piecemeal approach cuts down on the amount of learning you need to do at one time.
    > Should I create a separate project to make the participant dialog and then copy those files over.
    No.
    Just use a single NetBeans project.
    You will have separate FXML files for your main stage and your participant dialog, but they will both be placed in the same NetBeans project.
    > is there a way to make the files within the parent project?
    In NetBeans 7.3.1, do the following:
      File | New Project | JavaFX | JavaFX FXML Application
    This will create a sample project with a sample fxml file.
    Modify the sample project files to get what you want, changing the sample fxml to your main stage fxml and adding a new participant fxml to the same directory.

  • 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?

  • How to display the javafx application to a web application

    I've got a javaFX application .(My IDE is NetBeans 6.8)I choose the main.fx in the opened project,then run>>project configure >> web browser and Shift+F6.It runs as expected.
    and the path is "+http://localhost:8082/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/E%3A/Source+Codes/NTBS/MyProject/dist//MyPage.html+"
    However,I tried to access that page again when I closed the NetBeans.It failed.
    so I attempt to change the default html code.
    default code
    <script src="http://dl.javafx.com/1.2/dtfx.js"></script>
    <script>
        javafx(
                  archive: "MyJar.jar",
              draggable: true,
                  width: 300,
                  height: 300,
                  code: "MyPackage.Main",
                  name:
    "MyProject"
    </script>the changed code
    <script src="http://dl.javafx.com/1.2/dtfx.js"></script>
    <script>
        javafx(
            archive: "MyJar.jnlp",//or the like this   archive: "MyJar_browser.jnlp",
              draggable: true,
                  width: 300,
                  height: 300,
                  code: "MyPackage.Main",
                  name:
    "MyProject"
    </script>but it is futile.
    Considering maybe it needs server, I put the jar file and html file into tomcat ,it is nouse either.

    Thank you!
    yes I do.but I tried many many times.Finally,I got a phenomenon .Under Apache Tomcat container ,we can not access them by jnlp files,while the javafx's jar files set into the WEB-INF folder.
    Surely.we must put new another foler on the root to place javafx.
    Actually,we habitually put jar files into the lib folder which just under WEB-INF foler,and the JSP&servlet's specification.
    Is there a new way?

  • [Follow-up] JavaFX ARM Preview on an Iconia Tab A700

    Hi all,
    I'm going on with my work after a previous discussion:
    Re: JavaFX on ARM tablet
    Now I have an Iconia Tab A700 with Android 4.0.4, I locally mounted on it an image of Ubuntu ARM that I access via VNC.
    First of all, is the Iconia Tab A700 a correct ARM device that I can use for tests?
    I've then downloaded the JavaFX preview (http://jdk7.java.net/fxarmpreview/index.html), unpacked it on the Ubuntu ARM and tried to run a JavaFX application.
    I receive this kind of exception:
    Exception in thread "main" java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: /opt/jdk1.7.0_10/jre/lib/arm/libglass.so: /opt/jdk1.7.0_10/jre/lib/arm/libglass.so: undefined symbol: ZTVN10_cxxabiv120__si_class_type_infoE
         at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:306)
         at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:122)
         at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:163)
         at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
         at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
         at java.lang.Thread.run(Thread.java:722)
    Caused by: java.lang.UnsatisfiedLinkError: /opt/jdk1.7.0_10/jre/lib/arm/libglass.so: /opt/jdk1.7.0_10/jre/lib/arm/libglass.so: undefined symbol: ZTVN10_cxxabiv120__si_class_type_infoE
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939)
         at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864)
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
         at java.lang.Runtime.load0(Runtime.java:792)
         at java.lang.System.load(System.java:1059)
         at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(Unknown Source)
         at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(Unknown Source)
         at com.sun.glass.utils.NativeLibLoader.loadLibrary(Unknown Source)
         at com.sun.glass.ui.Application$1.run(Unknown Source)
         at com.sun.glass.ui.Application$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.glass.ui.Application.loadNativeLibrary(Unknown Source)
         at com.sun.glass.ui.Application.loadNativeLibrary(Unknown Source)
         at com.sun.glass.ui.gtk.GtkPlatformFactory.<clinit>(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:186)
         at com.sun.glass.ui.PlatformFactory.getPlatformFactory(Unknown Source)
         at com.sun.glass.ui.Application.run(Unknown Source)
         at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:296)
         ... 5 more
    How can I solve this?
    Thanks.

    First of all, is the Iconia Tab A700 a correct ARM device that I can use for tests?I don't think so.
    I think you should use the hardware (and follow the instructions) documented in the JavaFX ARM developer preview installation instructions:
    http://jdk7.java.net/fxarmpreview/javafx-arm-developer-preview.html
    For example use a BeagleBoardXM:
    http://beagleboard.org/hardware-xM
    Connected to a compatible display:
    http://www.chalk-elec.com/?page_id=1280#!/~/product/category=3094846&id=13727568
    Really, JavaFX on ARM is a prototyping platform targeted at an extremely limited set of hardware at the moment, not a production platform.
    It is in public preview now so that you can test it out and provide feedback via bugs and feature requests at http://javafx-jira.kenai.com.

Maybe you are looking for

  • Pricing update

    Hi! I have a problem with pricing update. For example I change information in pricing procedure adding new condition type but this new condition type appears in orders only in several hours. CRM version 5.0. Tell me please what can I do to speed up t

  • Net extender flashing red or solid green sys light

    I just had my net extender activated last week & have several issues: 1) the lights are blue, except the systems light will frequently return to flashing red or a steady green. I have shut down the extender for >30 sec w/o improvement, and I have shu

  • How to print to file

    When I "Print" the dialogue box gives the option to "Print to file".  However, I am unable to put a check mark in the box.  I want to "print to file" that is, save an email or a webpage to a "file" and not actually print it out.  Any suggestions as t

  • EIS 6.2 Data load

    We are upgrading to EIS 6.2. I've set up an outline that mirrors our production outline and can perform a member load without errors. The data load also runs without errors, the problem is no data gets loaded. I have cut and paste the SQL query the E

  • Next internal review date in status view

    Hi, Customer credit management transaction FD33, in status view, we have field "Next internal review". Can any one  let me know how this data is populated automatically. And how the documents will be selected for report "RVKRED08" Thanks Alokam Chand