JavaFX Radiobutton error

I've been through some problems with SwingRadioButton, it is unstable, sometimes it shows correctly, sometimes part of it displayed, sometimes they cannot be displayed at all.
Following is my code and I'm using Apple computer running it.
* PanelScenario.fx
* Created on Feb 7, 2009, 4:08:51 PM
package qc.gui;
import javafx.ext.swing.SwingRadioButton;
import javafx.ext.swing.SwingToggleGroup;
import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.layout.VBox;
import javafx.scene.Node;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import qc.gui.QcGUIConfig;
public class QcConfigScenario extends CustomNode{
    public var btGroup = SwingToggleGroup { };
    var txtScn = Text {
        font: Font {
            size: 14
        x: QcGUIConfig.fieldWidth + 10,
        y: QcGUIConfig.screenStart + 60
        content: "Scenario:       "
    public var aRadioBt = SwingRadioButton {
        text: "a"
        toggleGroup: btGroup
    public var bRadioBt = SwingRadioButton {
        text: "b"
        toggleGroup: btGroup
    public var cRadioBt = SwingRadioButton {
        text: "c"
        toggleGroup: btGroup
    override public function create(): Node {
        Group {
            content: [
                txtScn,
                VBox{
                    translateX: QcGUIConfig.fieldWidth + 10
                    translateY: QcGUIConfig.screenStart + 75
                    spacing: 5
                    content:[aRadioBt, bRadioBt, cRadioBt]
}

Hi there,
your code works fine on my windows m/c
I changed your code( because qc.gui.QcGUIConfig is not available )
instead of
x: QcGUIConfig.fieldWidth + 10,
        y: QcGUIConfig.screenStart + 60I have given hard coded values like 100, 100
same for
VBox{
                    translateX: QcGUIConfig.fieldWidth + 10
                    translateY: QcGUIConfig.screenStart + 75
I guess there may be the prob
it might be getting wrong values in
"QcGUIConfig.fieldWidth & QcGUIConfig.screenStart "
Regards
Pravin

Similar Messages

  • Netbeans 6.1 JavaFX build error

    Env: Netbeans 6.1, JavaFX, Linux, Java(TM) SE Runtime Environment 1.6.0_06-b02
    Hi,
    The error below is displayed building the "Practical Guide to JavaFX " project (CrudFX)
    http://molgav.nn.ru/index.php?view=article&catid=38%3Aexample&id=229%3Apractical-guide-to-javafx&option=com_content&Itemid=56
    /home/dkennedy/NetBeansProjects/CRUDfx/src/crudfx/DataGrid.fx:13: Sorry, I was trying to understand the module contents but I got confused when I saw 'DataGrid' which is an identifier.
    operation DataGrid.createView():<<javax.swing.JComponent>>
    Any help/suggestions would be greatly appreciated
    Thanks
    Dave
    DataGrid.fx ===================================================================
    package crudfx;
    import javafx.ui.*;
    import java.lang.*;
    import javafx.ui.canvas.*;
    import javafx.ui.filter.*;
    import crudfx.*;
    import javax.swing.JTable;
    class DataGrid extends Table
    operation DataGrid.createView():<<javax.swing.JComponent>>
    var jComponent=super.createView();
    Tools.adjustTableHeader(jComponent);
    return jComponent;
    operation DataGrid.createComponent():<<javax.swing.JComponent>>
    var jComponent=super.createComponent();
    Tools.adjustVerticalScrollBar(jComponent);
    return jComponent;
    log =========================================================================
    Error in syntactic analysis in DataGrid.fx:
    java.lang.NullPointerException
    at com.sun.tools.javafx.antlr.v3Walker.module(v3Walker.java:294)
    at com.sun.tools.javafx.antlr.JavafxSyntacticAnalysis.parse(JavafxSyntacticAnalysis.java:82)
    at com.sun.tools.javafx.main.JavafxCompiler.parse(JavafxCompiler.java:478)
    at com.sun.tools.javafx.main.JavafxCompiler.parse(JavafxCompiler.java:519)
    at com.sun.tools.javafx.main.JavafxCompiler.parseFiles(JavafxCompiler.java:826)
    at com.sun.tools.javafx.api.JavafxcTaskImpl.parse(JavafxcTaskImpl.java:196)
    at org.netbeans.api.javafx.source.JavaFXSource.moveToPhase(JavaFXSource.java:221)
    at org.netbeans.api.javafx.source.CompilationInfoImpl.toPhase(CompilationInfoImpl.java:129)
    at org.netbeans.api.javafx.source.CompilationController.toPhase(CompilationController.java:72)
    at org.netbeans.modules.javafx.source.scheduler.CompilationJob.run(CompilationJob.java:186)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    ============================================================================

    The CrudFX code uses the old syntax.
    The JavaFX Script Preview version uses new one: [http://java.sun.com/javafx/reference|http://java.sun.com/javafx/reference]
    The exception means that a project contains empty file:
    =========================================================================
    Error in syntactic analysis in DataGrid.fx:
    java.lang.NullPointerException
    at com.sun.tools.javafx.antlr.v3Walker.module(v3Walker.java:294)
    =========================================================================

  • JavaFX Applet error

    Hi All,
    I am getting the following error while hit my URL in browser,
    exception: null.
    JNLPException[category: Security Error : Exception: null : LaunchDesc:
    <jnlp spec="1.0+" codebase="file:/E:/workspace/demo/" href="file:/E:/workspace/demo/demo.jnlp">
      <information>
        <title>Demo Example by tham</title>
        <vendor>Citrine Flux</vendor>
        <homepage href="null"/>
        <description>Pie Chart</description>
        <description kind="short">Pie Chart Demo</description>
        <offline-allowed/>
      </information>
      <security>
        <all-permissions/>
      </security>
      <update check="timeout" policy="always"/>
      <resources>
        <java java-vm-args="-Xmx800m" href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>
        <jar href="file:/E:/workspace/demo/Hellojfx.jar" download="eager" main="true"/>
        <jar href="file:/E:/workspace/demo/Scenario.jar" download="eager" main="false"/>
        <jar href="file:/E:/workspace/demo/javafxrt.jar" download="eager" main="false"/>
        <jar href="file:/E:/workspace/demo/javafxgui.jar" download="eager" main="false"/>
        <jar href="file:/E:/workspace/demo/javafx-swing.jar" download="eager" main="false"/>
      </resources>
      <applet-desc name="PieChartDemo" main-class="hellojfx.PieChartDemo" documentbase="file:/E:/workspace/demo/demo.html" width="500" height="500"/>
    </jnlp> ]
         at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source)
         at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
         at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
         at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: JNLPException[category: Security Error : Exception: null : LaunchDesc:
    <jnlp spec="1.0+" codebase="file:/E:/workspace/demo/" href="file:/E:/workspace/demo/demo.jnlp">
      <information>
        <title>Demo Example by tham</title>
        <vendor>Citrine Flux</vendor>
        <homepage href="null"/>
        <description>Pie Chart</description>
        <description kind="short">Pie Chart Demo</description>
        <offline-allowed/>
      </information>
      <security>
        <all-permissions/>
      </security>
      <update check="timeout" policy="always"/>
      <resources>
        <java java-vm-args="-Xmx800m" href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>
        <jar href="file:/E:/workspace/demo/Hellojfx.jar" download="eager" main="true"/>
        <jar href="file:/E:/workspace/demo/Scenario.jar" download="eager" main="false"/>
        <jar href="file:/E:/workspace/demo/javafxrt.jar" download="eager" main="false"/>
        <jar href="file:/E:/workspace/demo/javafxgui.jar" download="eager" main="false"/>
        <jar href="file:/E:/workspace/demo/javafx-swing.jar" download="eager" main="false"/>
      </resources>
      <applet-desc name="PieChartDemo" main-class="hellojfx.PieChartDemo" documentbase="file:/E:/workspace/demo/demo.html" width="500" height="500"/>
    </jnlp> ]
    I am not able to view my applet. Can anyone help me on this?
    Thanks,
    Thamizharasu S

    This is the jnlp file i'm using.
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="./" href="videoPlayer.jnlp">
        <information>
            <title>Player</title>
            <vendor>xyz</vendor>
            <homepage href=""/>
            <description></description>
            <offline-allowed/>
            <shortcut>
                <desktop/>
            </shortcut>
        </information>
         <security>
            <all-permissions/>
        </security>
        <resources>
            <j2se version="1.5+"/>
            <jar href="../sisJars/VideoPlayer.jar" main="true" download="eager" />
            <extension name="JavaFX Runtime" href="http://dl.javafx.com/javafx-rt.jnlp"/>
        </resources>
        <applet-desc name="VideoPlayer" main-class="com.sun.javafx.runtime.adapter.Applet" width="646" height="375">
            <param name="MainJavaFXScript" value="com.sis.recordit.jfx.player.Main">
        </applet-desc>
        </jnlp>Thanks

  • How to use List within javaFX(*.fx) script?

    How to use java.util.List within javaFX(*.fx) script?
    The following is my code in Java
    PDBFileReader pdbreader = new PDBFileReader();
              pdbreader.setPath("/Path/To/PDBFiles/");
              pdbreader.setParseSecStruc(true);// parse the secondary structure information from PDB file
              pdbreader.setAlignSeqRes(true);  // align SEQRES and ATOM records
              pdbreader.setAutoFetch(true);    // fetch PDB files from web if they can't be found locally
              try{
                   Structure struc = pdbreader.getStructureById(code);
                   System.out.println("The SEQRES and ATOM information is available via the chains:");
                   int modelnr = 0 ; // also is 0 if structure is an XRAY structure.
                   List<Chain> chains = struc.getChains(modelnr);
                   for (Chain cha:chains){
                        List<Group> agr = cha.getAtomGroups("amino");
                        List<Group> hgr = cha.getAtomGroups("hetatm");
                        List<Group> ngr = cha.getAtomGroups("nucleotide");
                        System.out.print("chain: >"+cha.getName()+"<");
                        System.out.print(" length SEQRES: " +cha.getLengthSeqRes());
                        System.out.print(" length ATOM: " +cha.getAtomLength());
                        System.out.print(" aminos: " +agr.size());
                        System.out.print(" hetatms: "+hgr.size());
                        System.out.println(" nucleotides: "+ngr.size()); 
              } catch (Exception e) {
                   e.printStackTrace();
              }The following is my code in JavaFX(getting errors)
    var loadbtn:SwingButton = SwingButton{
        text:"Load"
        action: function():Void{
            var pdbreader = new PDBFileReader();
            var structure = null;
            try{
                structure = pdbreader.getStructure(filepath.text);
                List<Chain> chains = structure.getChains(0);
                foreach (Chain cha in chains){
                        List < Group > agr = cha.getAtomGroups("amino");
                        List < Group > hgr = cha.getAtomGroups("hetatm");
                        List < Group > ngr = cha.getAtomGroups("nucleotide");
            } catch (e:IOException) {
                e.printStackTrace();
        };I'm using Netbeans 6.5 with JavaFX
    (PDBFileReader, Chain, Structure etc are classes from my own package, already added to the library folder under the project directory)
    Simply put, How to use List and Foreach in JavaFX?

    We can not use Java Generics syntax in JavaFX. But we can use Java Collection classes using the keyword 'as' for type-casting.
    e.g.
    import java.util.LinkedList;
    import java.util.List;
    import javafx.scene.shape.Rectangle;
    var outerlist : List = new LinkedList();
    var innerlist : List = new LinkedList();
    innerlist.add(Rectangle{
        width: 10 height:10});
    innerlist.add(Rectangle{
        width: 20 height:20});
    outerlist.add(innerlist);
    for (inner in outerlist) {
        var list : List = inner as List;
        for (element in list) {
            var rect : Rectangle = element as Rectangle;
            println("(width, height)=({rect.width}, {rect.height})");
    }

  • JavaFX 2.0 64bit SDK won't install

    Hi. A noddy question perhaps???
    On my MS Windows 7 Home Premium 64 bit laptop with IE 9.0 browser (both 32 and 64 bit) I have:
    - Uninstalled Java 6.xx (32 bit)
    - Installed Java 7 SE 32 bit from jre-7-windows-i586.exe and confirmed it's there.
    - Installed Java 7 JDK 64 bit from jdk-7-windows-x64.exe without the local JSE 64 bit install
    - Added Java to the PATH .
    On trying to install the JavaFX 2.0 SDK 64 bit from javafx_sdk-2_0-beta-b45-windows-x64-07_sep_2011.EXE downloaded off the Oracle web site I immediately get a "JavaFX Setup Error" saying "Java Version 6 Update 10 or later is required to install and run JavaFX 2.0 content..." etc...
    Any suggestions please re why and what to do to correct this? E.g. do I need the JRE7 64 bit installed, and not just 32 bit?
    Many thanks...

    Hi,
    The JavaFX sdk installer will install both sdk and JavaFX runtime, it will first check if system has the prerequisite of jre and jdk.
    Since you are trying to install 64-bit Javafx sdk, you need to have 64-bit jre(6u10 or later) and 64-bit jdk on your system. But, from you description, you installed 32-bit jre.
    If you install 64-bit jre on your system first, it will fix your problem.

  • Failed to launch JavaFX application with native bundle exe

    Hi,
    I have created a JavaFX application, and created its native bundle using Ant. When I am trying to launch application using Jar from bundle created with double click, it successfully launching my application. But when I am trying double click on MyApplication.exe (say), it throwing JavaFX Launcher Error *"Exception while running Application"*.
    I have searched about this issue, I found about jre, so I did replace jre from *"C:\Program Files\Java\jdk1.7.0_10\jre"* to my application bundle folder -- *\bundles\MyApplication\runtime\jre*, then I tried to launch exe with double click, it successfully launched.
    I have compared both jre, there are many missing jar, exe, dll and some properties files I found.
    I have these environment settings -
    JAVA_HOME -- C:\Program Files\Java\jdk1.7.0_10
    JREFX_HOME -- C:\Program Files\Oracle\JavaFX 2.2 Runtime
    Path contains an entry of C:\Program Files\Java\jdk1.7.0_10\bin JAVA_HOME and JREFX_HOME are used as in my build.xml to take ant-javafx.jar and jfxrt.jar --
    ${env.JAVA_HOME}/lib/ant-javafx.jar
    ${env.JREFX_HOME}/lib/jfxrt.jarMy steps to create bundle are -
    <target name="CreatingExe" depends="SignedJar">
                 <fx:deploy width="800" height="600" nativeBundles="all" outdir="${OutputPath}" outfile="${app.name}">
                          <fx:info title="${app.title}"/>
                          <fx:application name="${app.title}" mainClass="${main.class}"/>
                          <fx:resources>
                               <fx:fileset dir="${OutputPath}" includes="*.jar"/>
                         <fx:fileset dir="${WorkingFolder}/temp"/>
                   </fx:resources>
               </fx:deploy>
    </target>What more needed in build.xml so that application launch correctly with exe ?
    Thanks

    You code is not dealing with the DACL access to Winsta0\Default.  Only the LocalSystem account will have full access and the interactively logged on user which is why regedit is not displaying properly.  You'll need to grant access to your user. 
    You also need to deal with UAC since that code is going to give you a non-elevated token via LogonUser().  You need to get the full token via a call to GetTokenInformation() + TokenLinkedToken.
    thanks
    Frank K [MSFT]
    Follow us on Twitter, www.twitter.com/WindowsSDK.

  • Unable to launch jar in dist folder

    Hello Everyone.
    I'm using Netbeans 7.1, javafx 2.02. I have a small application in JavaFX, the software executed fine from Netbeans IDE, however when i tried to launch it by double clicking the jar file directly, i got this "JavaFx launcher Error, exception while running application".
    Need advice, probably this topic is more on how to deploy a developed JavaFX application
    1. Was it because i'm not suppose to launch the program directly and need some upfront settings before i'm allowed to do so?
    2. How to get more detail error on whats went wrong
    3. How to effectively deploy my application
    Many thanks in advance.

    I'm having same problem. Building and running from the Netbeans works fine but when trying to double click the jar-file in dist folder get JavaFX Launcher Error.
    Least in my case, the problem is with external libraries. Problems started when started to play with spring and rmi.
    When starting form command line stack trace is following:
    Exception in Application constructor
    java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at com.javafx.main.Main.launchApp(Main.java:453)
            at com.javafx.main.Main.main(Main.java:570)
    Caused by: java.lang.RuntimeException: Unable to construct Application instance:
    class org.tut.amcosop.hometerminal.HomeTerminal
            at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown So
    urce)
            at com.sun.javafx.application.LauncherImpl.access$000(Unknown Source)
            at com.sun.javafx.application.LauncherImpl$1.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoClassDefFoundError: org/springframework/context/Applicati
    onContext
            at java.lang.Class.getDeclaredConstructors0(Native Method)
            at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
            at java.lang.Class.getConstructor0(Unknown Source)
            at java.lang.Class.getConstructor(Unknown Source)
            ... 4 more
    Caused by: java.lang.ClassNotFoundException: org.springframework.context.Applica
    tionContext
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 8 moreSo seems that springframework is not found.
    Found this http://stackoverflow.com/questions/6750249/javafx-2-0-application-referencing-external-jars but not really help since corresponding project files did not contain same lines/blocks.
    MANIFEST.MF inside jar contains following:
    Manifest-Version: 1.0
    JavaFX-Version: 2.0
    implementation-vendor: summanek
    implementation-title: HomeTerminal
    implementation-version: 1.0
    JavaFX-Application-Class: org.tut.amcosop.hometerminal.HomeTerminal
    JavaFX-Class-Path:
    JavaFX-Fallback-Class: com.javafx.main.NoJavaFXFallback
    Created-By: JavaFX Packager
    Main-Class: com/javafx/main/Main
    Should JavaFX-Class-Path be empty?

  • MouseListener not responding.

    I'm working on a school project to make a video player/image gallery/Paint rip-off. I'm having a problem with a MouseListener that's not responding and I don't know how to get around it.
    (Note: I know that combining Swing and JavaFX is error-prone and not ideal, however this class focuses on Swing and so we must use it)
    public class DisplayWindow implements MouseListener {
         JFrame frame;
         private MouseListener[] listeners;
         public static void main(String[] args) {
              EventQueue.invokeLater(new Runnable() {
                   public void run() {
                        try {
                             DisplayWindow window = new DisplayWindow();
                             window.frame.setVisible(true);
                        } catch (Exception e) {
                             e.printStackTrace();
         public DisplayWindow() {
              initialize();
         private void initialize() {
              frame = new Welcome(this);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         @Override
         public void mouseClicked(MouseEvent e) {
              JPanel p = (JPanel) e.getSource();
              switch (p.getName()) {
              case "videoPanel" :
                   System.out.println("run videobrowser");
                   break;
    public class Welcome extends JFrame {
         public JPanel imagePanel;
         public JPanel videoPanel;
         public JPanel doodlePanel;
         DisplayWindow listener;
         public Welcome(DisplayWindow listener) {
              this.listener = listener;
              getContentPane().setBackground(Color.DARK_GRAY);
              setBounds(100, 100, 800, 600);
              videoPanel = new JPanel();
              videoPanel.setName("videoPanel");
              videoPanel.addMouseListener(listener);
              FlowLayout videoLayout = (FlowLayout) videoPanel.getLayout();
              videoLayout.setAlignment(FlowLayout.LEFT);
              videoLayout.setHgap(-5);
              videoLayout.setVgap(-5);
              Dimension d = new Dimension(243, 163);
              File videoFile = new File("footballfail.mp4");
              try {
                   imagePanel.add(new WelcomeImageLoader(imageFile, d));
                   doodlePanel.add(new WelcomeImageLoader(doodleFile, d));
                   videoPanel.add(new WelcomeVideoLoader(videoFile, d));
              } catch (IOException e) {
                   e.printStackTrace();
              getContentPane().setLayout(groupLayout);
    public class WelcomeVideoLoader extends JPanel {
         public WelcomeVideoLoader(File videoFile, final Dimension d) {
              Media media = new Media(videoFile.toURI().toString());
              final JFXPanel jfxPanel = new JFXPanel();
              //final Dimension dim = d;
              final Group root = new Group();
              MediaPlayer player = new MediaPlayer(media);
              player.play();
              player.setCycleCount(MediaPlayer.INDEFINITE);
              player.setMute(true);
              MediaView view = new MediaView(player);
              DoubleProperty width = view.fitWidthProperty();
              DoubleProperty height = view.fitHeightProperty();
              width.bind(Bindings.selectDouble(view.sceneProperty(), "width"));
              height.bind(Bindings.selectDouble(view.sceneProperty(), "height"));
              view.setTranslateX(13);
              view.setPreserveRatio(true);
              root.getChildren().add(view);
              Platform.runLater(
                        new Runnable() {
                             @Override
                             public void run() {
                                  Scene scene = new Scene(root, d.getWidth(), d.getHeight(), Color.valueOf("#404040"));
                                  jfxPanel.setScene(scene);
              super.add(jfxPanel);
    }The video is looping fine in videoPanel but as I said before, MouseListener is no longer responding. I have more JPanels (images, not videos, so I don't have a problem with threads interfering) in class Welcome but I didn't include them to keep the code short. Their MouseListeners are responding though.
    Does anyone know why the MouseListener on videoPanel is not responding and what I can do to fix this? I'm still new to programming, so if you know the answer, please explain it like you're explaining it to a chimp.

    I mocked up something similar to try to see what is going on. It appears that adding a mouse listener directly to a JFXPanel will work, but the mouse event will not get propagated to a JPanel that contains the JFXPanel. In your case, your JFXPanel is contained in a JPanel (the WelcomeVideoLoader), which is contained in the videoPanel, to which the mouse listener is attached. I think you somehow need to arrange for a mouse listener to be registered with the JFXPanel.

  • CSS Error in running javafx application after move to use jdk8

    Hi all,
    I'm running an javafx app fine with build: jdk-8-ea-b36e-linux-arm-hflt-29_nov_2012 which uses jdk7 perfectly fine on the raspberry pi (which i also keep as backup until newer builds well, are starting to work with my app).
    I'm getting an exception related to CSS (seems to me) when i try to run my javafx app (as well through netbeans on windows xp as through command line on the raspberry pi):
    I've try'd two netbeans versions, the stable 7.3 with jdk 1.8 build 100 and nightly 7.4 with the same jdk 1.8 build. Building goes fine on both these versions.
    The exception is:
    Exception in thread "JavaFX Application Thread"
       java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
       at java.util.ArrayList.rangeCheck(ArrayList.java:638)
       at java.util.ArrayList.get(ArrayList.java:414)
       at com.sun.javafx.css.StyleMap.getCascadingStyles(StyleMap.java:121)
       at javafx.scene.CssStyleHelper.getStyle(CssStyleHelper.java:683)
       at javafx.scene.CssStyleHelper.lookupFont(CssStyleHelper.java:1548)
       at javafx.scene.CssStyleHelper.transitionToState(CssStyleHelper.java:460)
       at javafx.scene.Node.impl_processCSS(Node.java:8665)
       at javafx.scene.Parent.impl_processCSS(Parent.java:1192)
       at javafx.scene.Parent.impl_processCSS(Parent.java:1204)
       at javafx.scene.Node.processCSS(Node.java:8575)
       at javafx.scene.Scene.doCSSPass(Scene.java:538)
       at javafx.scene.Scene.preferredSize(Scene.java:1503)
       at javafx.scene.Scene.impl_preferredSize(Scene.java:1570)
       at javafx.stage.Window$9.invalidated(Window.java:733)
       at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
       at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:143)
       at javafx.stage.Window.setShowing(Window.java:799)
       at javafx.stage.Window.show(Window.java:814)
       at javafx.stage.Stage.show(Stage.java:243)
       at pidome.client.PidomeClient$1$1.run(Unknown Source)
       at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:244)
       at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:241)
       at java.security.AccessController.doPrivileged(Native Method)
       at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:241)
       at com.sun.glass.ui.lens.LensApplication$RunnableEvent.dispatch(LensApplication.java:169)
       at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:756)
       at com.sun.glass.ui.lens.LensApplication.access$700(LensApplication.java:55)
       at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:815)
       at java.lang.Thread.run(Thread.java:724)
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
       at java.util.ArrayList.rangeCheck(ArrayList.java:638)
       at java.util.ArrayList.get(ArrayList.java:414)
       at com.sun.javafx.css.StyleMap.getCascadingStyles(StyleMap.java:121)
       at javafx.scene.CssStyleHelper.getStyle(CssStyleHelper.java:683)
       at javafx.scene.CssStyleHelper.lookupFont(CssStyleHelper.java:1548)
       at javafx.scene.CssStyleHelper.transitionToState(CssStyleHelper.java:460)
       at javafx.scene.Node.impl_processCSS(Node.java:8665)
       at javafx.scene.Parent.impl_processCSS(Parent.java:1192)
       at javafx.scene.Parent.impl_processCSS(Parent.java:1204)
       at javafx.scene.Node.processCSS(Node.java:8575)
       at javafx.scene.Node.processCSS(Node.java:8566)
       at javafx.scene.Scene.doCSSPass(Scene.java:538)
       at javafx.scene.Scene.access$3600(Scene.java:189)
       at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2294)
       at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:325)
       at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:533)
       at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:513)
       at com.sun.javafx.tk.quantum.QuantumToolkit$16.run(QuantumToolkit.java:380)
       at com.sun.glass.ui.lens.LensApplication$RunnableEvent.dispatch(LensApplication.java:169)
       at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:756)
       at com.sun.glass.ui.lens.LensApplication.access$700(LensApplication.java:55)
       at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:815)
       at java.lang.Thread.run(Thread.java:724)
    On line 22 is where i think my problem really begins. This line correspondents to my code on line 14:
        @Override
        public void start(Stage primaryStage) {
            redirectOutputToLog();
            rootStage = primaryStage;
            rootStage.setTitle("PiDome Client");
            rootStage.setFullScreen(true);
            rootStage.initStyle(StageStyle.UNDECORATED);
            ready.addListener(new ChangeListener<Boolean>(){
                @Override
                public void changed(
                    ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
                        if (Boolean.TRUE.equals(t1)) {
                            rootStage.setScene(mainStage.scene());
                            rootStage.show();
            initialize();
    The rest of my main file is as follows (snippet):
    public class PidomeClient extends Application implements NetworkingEventListener,ClientDataConnectionListener,DomoticsEventListener,MainSceneEventListener,PreloaderCredentials {
    MainScene mainStage;
    BooleanProperty ready = new SimpleBooleanProperty(false);
      public void start(Stage primaryStage){
      /* See above snippet */
        public final void initialize(){
            /* code */
            mainStage = new MainScene();
            /* code */
      /* some functions for the listeners added */
        @Override
        public void handleMainSceneEvent(MainSceneEvent event) {
            if(event.getEventType().equals(MainSceneEvent.SCENEBUILDDONE)){
                notifyPreloader(new StateChangeNotification(StateChangeNotification.Type.BEFORE_START));
                ready.setValue(Boolean.TRUE);
    Some code from my MainScene class:
    public final class MainScene {
        Pane root = new Pane();
        Scene appScene = new Scene(root, DisplayConfig.getScreenWidth(), DisplayConfig.getScreenHeight());
        String theme = Theme.getCurrent();
        NotificationBar notBar = new NotificationBar();
        TopBar topBar          = new TopBar();
        MainControl mainControl= new MainControl();
        BottomBar bottomBar    = new BottomBar();
        //Console   console      = new Console();
        SubControl subControl     = new SubControl();  
      public MainScene(){
        public final void createScene(){
            LOG.debug("Screen dimensions: width: {}, height: {}",DisplayConfig.getScreenWidth(), DisplayConfig.getScreenHeight());
            root.getStylesheets().add(theme + "main.css");
            root.getChildren().add(notBar);
            root.getChildren().add(topBar);
            root.getChildren().add(mainControl);
            root.getChildren().add(bottomBar);
            root.getChildren().add(subControl);
            //console.show();
            _fireSceneBuildDone();
        public final Scene scene(){
            return appScene;
        public final void stop(){
            //topBar.stopThreads();
        public synchronized static void addDoneListener(MainSceneEventListener l){
            _listeners.add(l);
        final synchronized void _fireSceneBuildDone(){
            LOG.debug("New event: {}", MainSceneEvent.SCENEBUILDDONE);
            MainSceneEvent serviceEvent = new MainSceneEvent(this, MainSceneEvent.SCENEBUILDDONE);
            Iterator listeners = _listeners.iterator();
            while (listeners.hasNext()) {
                ((MainSceneEventListener) listeners.next()).handleMainSceneEvent(serviceEvent);
    Further explanation:
    The lines 8 until 14 are the children that have they're own CSS files which are included, they do not contain the .root element. This element is only present in the main.css class. As you can see i'm using a preloader which also has it's own CSS but with the .root element, but this one does not contain anything related to fonts. I have try'd a lot of things because i'm thinking i'm in error because i have seen this on the javafx 8 Performance ideas page (https://wiki.openjdk.java.net/display/OpenJFX/Performance+Ideas): "Rather than running CSS at start up, precompute the defaults and initialize FX to have these values.  This should improve start up time." I do not know if this is related. What i've tryed is
    - move the children created in MainScene to another location,
    - Completely discard the preloader (as wel as in netbeans is in the code),
    - Removed everything that was font related out of my css,
    - Removed everything that was font related from my code,
    - Removed the traling slash to the path to the css returned by my function theme.getCurrent(); But then i get the error that the file is not found.
    - Went completely procedural when creating the scene objects and children.
    I posted a recent amount of  code, and, i'm out of options at the moment. So, is there a bug or am i doing something wrong and should i rethink on how CSS is handled in FX 8?
    Best regards,
    John
    Some changes in explanation.
    Message was edited by: JohnMefster

    Well, i found the/a solution for the above:
    I've put all my css in one file, and found some empty declarations like #mainbottomcontainer .content .label { }. I removed these 3 empty declarations and now my app also works in build 101. So i do now think this has to do with the CSS remark posted above. And i do think this is due to setting CSS in the declaration part of a class at startup (like in my MainScene class above), but i'm not sure. But, it is fixed for now.
    John.

  • Getting bug error while compiling object binding code in javaFX

    I am new to javaFX and exploring it from just last two days.
    today i tried a simple binding object example and got weird exception about bug.
    i created a simple file with name Calculator.fx having just one line public var result=1;and used object binding in another file Customer.fx with following code
    var myStreet=21;
    var address= bind Calculator{
         result:myStreet;
    println({address.result});i got following output error
    init:
    deps-jar:
    Note: An internal error has occurred in the OpenJFX compiler. Please file a bug at the
    Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues)
    after checking for duplicates.  Include in your report:
    - the following diagnostics
    - file C:\Users\omnidoc\AppData\Local\Temp\javafx_err_59993.txt
    - and if possible, the source file which triggered this problem.
    Thank you.
    C:\cc_storage\Caculator\src\Customer.fx:3: cannot find symbol
    symbol  : variable VOFF$result
    location: class Calculator
    def address= bind Calculator{
    1 error
    ERROR: javafxc execution failed, exit code: 1
    C:\cc_storage\Caculator\nbproject\build-impl.xml:143: exec returned: -1
    BUILD FAILED (total time: 2 seconds)Am i doing something wrong or is it really a bug.
    Also can anyone tell me how to do object binding in javaFX.
    thanks
    chauhan

    chauhan2003 wrote:
    Am i doing something wrong or is it really a bug.When you get such error, that's both: you made a mistake (and at least you get a generally helpful message about it) but the compiler is bugging out and crashing...

  • Getting GTK error while running javaFX application on linux

    I developed an JavaFX application that works fine on Windows. So, I tried to run this same application on Linux (ubuntu x86) and it is not working. I setup all the environment with following this article : http://docs.oracle.com/javafx/2.0/release_notes_linux/jfxpub-release_notes_linux.htm. The Sample JavaFX applications available at http://www.oracle.com/technetwork/java/javafx/downloads/devpreview-1429449.html work great on Linux. But when I run my application, I got this error:
    java -jar prototipoGui.jar
    Exception in thread "main" java.lang.RuntimeException: Application launch error
    at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:122)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: java.lang.UnsatisfiedLinkError: com.sun.glass.ui.gtk.GtkApplication._invokeLater(Ljava/lang/Runnable;)V
    at com.sun.glass.ui.gtk.GtkApplication._invokeLater(Native Method)
    at com.sun.glass.ui.Application.invokeLater(Application.java:336)
    at com.sun.javafx.tk.quantum.QuantumToolkit.defer(QuantumToolkit.java:617)
    at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:138)
    at com.sun.javafx.application.PlatformImpl.runAndWait(PlatformImpl.java:171)
    at com.sun.javafx.application.PlatformImpl.tkExit(PlatformImpl.java:264)
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:417)
    at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
    at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
    ... 1 more

    I get the same message, when running my application in stand alone.
    May be there is a problem when running in aa KDE environment.
    But I developed my app in Eclipse under KDE4. If the app is started by IDE it runs.

  • Java run time error while executing JavaFX code

    Hi
    I copied the code from [http://java.sun.com/javafx/1/tutorials/ui/overview/UIControls.fx|http://java.sun.com/javafx/1/tutorials/ui/overview/UIControls.fx] while
    reading in [http://java.sun.com/javafx/1/tutorials/ui/overview/#controls|http://java.sun.com/javafx/1/tutorials/ui/overview/#controls] tutorial and paste it to my
    netbeans editor but i got following error.
    init:
    deps-jar:
    compile:
    jar:
    standard-run:
    # An unexpected error has been detected by Java Runtime Environment:
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d94513f, pid=5152, tid=5996
    # Java VM: Java HotSpot(TM) Client VM (1.6.0_03-b05 mixed mode, sharing)
    # Problematic frame:
    # V  [jvm.dll+0xd513f]
    # An error report file with more information is saved as hs_err_pid5152.log
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    BUILD FAILED (total time: 18 seconds)can anyone tell whether its netbeans fault or javaFX. I am using netbeans 6.5.1 on windows vista. I have added following plugin in netbeans for javaFX
    *JavaFX Kit
    *JavaFX SDK for Windows
    is anyone also getting this error for this code and have solution for this.

    You are correct the crash is causing due to ToggleButton and ProgessBar. the code is correct because i tried it on eclipse 3.4 and it worked fine.This is definitely netbeans error. because its giving error even if u try to execute javafx code with just one ToggleButton or ProgressBar. I tried the following simple code in netbeans 6.5
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.control.ToggleButton;
    import javafx.scene.control.ProgressBar;
    var toggle=ToggleButton {
                    translateX:50
                    translateY:50
                    text: "First"
                    width:100
                    height:20
    var progress= ProgressBar {
            progress: bind ProgressBar.computeProgress( 100, 30 )
    Stage {
        title : "Toggle Button Test"
        scene: Scene {
            width: 200
            height: 200
            content: [ toggle
    } When i just added toggle button to contents then button showed up in window but on clicking it window disappear and compiler gave crash error on the other hand when i added just progess bar it just throws the error.The same code is running fine on eclipse
    Is there any workaround in netbeans for this if its a bug and if not what should i do to correct it.

  • Did you hit this error before in javafx MediaPlayer?

    Hi,All
    I 'd like to make a javafx mediaplayer to play mp3 ,and I found some of mp3 wouldn't be supported by javafx mediaplayer,I don't know how can I solve this bug?
    I posted a mp3 file to the public network ,if you are interested in this issue, you can download this mp3 from this line for test.
    https://www.dropbox.com/s/wk2i9amk0kczqxe/And%20the%20Cradle%20Will%20Rock.mp3
    *mediaPlayer.getError() = MediaException: UNKNOWN : [com.sun.media.jfxmediaimpl.NativeMediaPlayer@104fc23] "Error media invalid": "Error media invalid"*
    Exception Message:
    * Copyright (c) 2008, 2011 Oracle and/or its affiliates.
    * All rights reserved. Use is subject to license terms.
    import java.io.File;
    import javafx.application.Application;
    import javafx.scene.media.AudioSpectrumListener;
    import javafx.scene.media.Media;
    import javafx.scene.media.MediaPlayer;
    import javafx.stage.Stage;
    * An example of an AnchorPane layout.
    * @see javafx.scene.layout.AnchorPane
    * @related controls/text/SimpleLabel
    * @resource icon-48x48.png
    public class AnchorPaneSample extends Application {
         private MediaPlayer mediaPlayer;
         private Media media;
         private AudioSpectrumListener spectrumListener;
         private void init(Stage primaryStage) {
              initializeMp3();
        public void initializeMp3()
             if (mediaPlayer != null )
                mediaPlayer.stop();
                mediaPlayer.setAudioSpectrumListener(null);
             String fullpath="C:/And the Cradle Will Rock.mp3";//please download this mp3 from this line ,https://www.dropbox.com/s/wk2i9amk0kczqxe/And%20the%20Cradle%20Will%20Rock.mp3
             File file=new File(fullpath);
              media=new Media(file.toURI().toString());
             mediaPlayer=new MediaPlayer(media);
             mediaPlayer.setAutoPlay(true);
             mediaPlayer.setAudioSpectrumNumBands(10);
            mediaPlayer.setAudioSpectrumListener(spectrumListener);
            mediaPlayer.setAudioSpectrumInterval(1d/30d);
             mediaPlayer.setOnError(new Runnable() {
                 @Override public void run() {
                     System.out.println("mediaPlayer.getError() = " + mediaPlayer.getError());
             mediaPlayer.setOnEndOfMedia(new Runnable(){
                   @Override public void run() {
                            //todo
        @Override public void start(Stage primaryStage) throws Exception {
            init(primaryStage);
            primaryStage.show();
        public static void main(String[] args) { launch(args); }
    }Edited by: imtoocute on May 22, 2012 11:21 AM
    Edited by: imtoocute on May 22, 2012 11:22 AM
    Edited by: imtoocute on May 22, 2012 11:34 AM

    It appears that the file is actually encoded as aac, not mp3. Try changing the file extension and see if that doesn't help.
    We'll look at handling this sort of discrepancy, but I'm not sure how reliably we will be able to detect this condition.
    General / Container Stream #1
         Total Audio Streams for this File.................1
         Audio Codecs Used.................................AAC LC
         File Format.......................................MPEG-4
         Play Time.........................................3mn 0s
         Total File Size...................................6.62 MiB
         Total Stream BitRate..............................308 Kbps
         Title (Tag).......................................And the Cradle Will Rock...
         Copyright (Tag)...................................2011 Rockabye Baby! Music
    Audio Stream #1
         Codec.............................................AAC
         Codec (FourCC)....................................40
         Audio Stream Length...............................3mn 0s 513ms
         Audio Stream BitRate..............................304 Kbps
         Audio Stream BitRate Mode.........................VBR
         Number of Audio Channels..........................2
         Audio Channel's Positions.........................Front: L R
         Sampling Rate.....................................44.1 KHz
         Audio Stream Size.................................6.55 MiB (99%)
         Date of Original Encoding.........................UTC 2011-11-09 18:50:15
    Menu / Chapters Stream #1

  • Facing Error in Radiobutton - Webdynpro ABAP

    Hi,
    I am using Radiobutton UI Element.
    I have requirement of taking 5 Radiobutton in which user can only select 1 value.
    So I have created 5 Radiobutton . I have binded KeytoSelect property to different value
    Say
    For 
    RD1 its LA
    RD2 its LB
    RD3 its LC
    RD4 its LD
    RD5 its LE
    So i have bound all these radiobutton to one attribute of node whose cardanality is 1 : 1 and type char2.
    So when i execute it , on any event on screen it is giving me error
    'The value entered is not in the list of allowed values.'
    So i could not found the reason why it is coming. I have also tried to make one data element and domain and try to put
    the values like LA  to LC in its fixed value but again it is giving the same error.
    Please suggest
    Thanks
    Ankesh

    Have you used RADIO_BUTTON_GROUP_BY_IDX or RADIO_BUTTON_GROUP_BY_KEY?  And check the fixed values that you have used. You should use LA rathen than 'LA'.
    You need to do some coding for radio button ui element and attach an event for eg. ON_SELECT to it.
    Eg. I have 4 radio buttons and bound it to attribute with domain having fixed values 1,2,3 and 4.
    Then do the coding in method ONACTIONON_SELECT that is attached to UI Element radio button.
    Here RADIO_BUTTON_GROUP_BY_KEY is used.
    data : str type string.
      str = wdevent->get_string('KEY').
      if str = '1'.
        CALL METHOD wd_context->set_attribute
          EXPORTING
           index  = USE_LEAD_SELECTION
         value  =  ' radio button 1 selected'
            name   = 'DISPLAY'
    where DISPLAY is attribute of type string.
        ELSEIF str = '2'.
       CALL METHOD wd_context->set_attribute
          EXPORTING
           index  = USE_LEAD_SELECTION
         value  =  ' radio button 2 selected'
            name   = 'DISPLAY'.
      ELSEIF str = '3'.
        CALL METHOD wd_context->set_attribute
          EXPORTING
           index  = USE_LEAD_SELECTION
         value  =  ' radio button 3 selected'
            name   = 'DISPLAY'
        ELSEIF str = '4'.
         CALL METHOD wd_context->set_attribute
          EXPORTING
           index  = USE_LEAD_SELECTION
         value  =  ' radio button 4 selected'
            name   = 'DISPLAY'.
        endif.

  • Potential error with published JavaFX applet?

    Hi there
    This is a "strange" request. I have recently published a JavaFX app on-line and broadcast a link to it via my blog. Before doing so I successfully tested it on my machines at home (OS X and Win XP) and at work (Win XP and OS X). However I have had a complaint, via the comments, that it does not work? I have emailed the commenter requesting further info regarding OS etc, but am yet to hear anything.
    Could you try this link and tell me if it does NOT work, along with OS, Browser, JVM version and error message? It is signed so you will be prompted to trust the source, I had to sign it because I am interfacing with the Twitter API.
    Blog post: http://itssmee.wordpress.com/2010/05/25/javafx-1-3-twitter4j-twitter-api-basic-javafx-twitter-client-and-tweet-cloud-generator/
    Applet url: http://bikefacts.co.uk/javafx/TweetCloud/index.html
    I am very confused as to why it works for me (in two locations) but not for this other person (you can see the comments on the posting).
    Thank you.

    Ah, some hours ago, I couldn't even get the page. Now it works (from another computer).
    WinXP Pro SP3, Java 1.6.0_20
    I had to accept twice the security dialog. You mention it in your blog, but it is worth repeating here that one must have a Twitter account to use your applet.
    I am uneasy to give my password to an applet, BTW, even if I trust you... :-)
    Even on my slow computer, it was quite reactive (perhaps _jesuino has the same issue than me some time ago).
    The cloud is nice, but we should be able to zoom, the small words are unreadable.

Maybe you are looking for

  • Can you access/use multiple apple ID's on one device?

    Hello, In our family we have been registering everything (ipods, iphones and computers) all under one apple id. We have made purchases with the family apple id which we have been accessing on multiple devices. With everyones different needs I am wond

  • Delete Requests (Except Compressed ones) in Cube in Process Chain's Routine

    Hi all,     We load an InfoCube on weekdays and we compress the Month-End load request. My request is to keep the latest SEVEN requests and DELETE all other requests EXCEPT the Compressed requests.  I should not delete the COMPRESSED Requests. I want

  • Removing Non-Ascii Characters from a String

    Hi Everyone, I would like to remove all NON-ASCII characters from a large string. For example, I am taking text from websites and would like to remove all the strange arabic and asian characters. How can I accomplish this? Thank you in advance.

  • TopLink SessionBean Example Deploy Exception

    I am deploying the SessionBean Example which comes with TopLink installable in the examples folder on OC4J 9.0.4 standalone server. I have changed the datasource references for Db url and db driver in the DataSource.xml. Also added TopLink.jar and Xe

  • Access denied - CredentialAccessPermission - error in OIF when starting WLS

    All, In an existing 2-node OIF deployment, a new oif.ear file was deployed and following the deployment via WLS admin console, the application components are not accessible (e.g., accessing application component /fed/user/testspsso results in HTTP 50