NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

JavaFX application development with Netbeans on Linux (OpenSuse)

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
jrahman



Joined: 23 May 2012
Posts: 1

PostPosted: Wed May 23, 2012 5:46 am    Post subject: JavaFX application development with Netbeans on Linux (OpenSuse) Reply with quote

Hi:
My Netbeans and associated information are as below:
- Product Version: NetBeans IDE 7.1.2 (Build 201204101705)
- Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
- JavaJX: javafx-sdk2.1.0
- System: Linux version 3.1.10-1.9-desktop running on i386 (OpenSuse 12.1)

Created a JavaFX "Hello World" application which builds without any error. However, if I run (from Netbeans), it gives me an output which only shows the frame (stage in JavaFX term ?) no buttons, as seen here:http://javafxerror.blogspot.ca/

Please let me know how to resolve this problem.

Thanks.

The runtime errors logs:
Code:
compile:
Detected JavaFX Ant API version 1.1
Launching <fx:jar> task from /usr/lib/jvm/javafx-sdk2.1.0/lib/ant-javafx.jar
Launching <fx:deploy> task from /usr/lib/jvm/javafx-sdk2.1.0/lib/ant-javafx.jar
Skip jar copy to itself: MyJavaFX.jar
jfx-deployment:
jar:
run:
SEVERE: javafx.scene.control.Control loadSkinClass Failed to load skin 'StringProperty [bean: Button[id=null, styleClass=button], name: skinClassName, value: com.sun.javafx.scene.control.skin.ButtonSkin]' for control Button[id=null, styleClass=button]
java.lang.NullPointerException
   at com.sun.javafx.font.FontConfigManager.populateMapsNative(Native Method)
   at com.sun.javafx.font.FontConfigManager.populateMaps(FontConfigManager.java:228)
   at com.sun.t2k.T2KFontFactory.getFullNameToFileMap(T2KFontFactory.java:1407)
   at com.sun.t2k.T2KFontFactory.getFontResource(T2KFontFactory.java:400)
   at com.sun.t2k.LogicalFont.getSlot0Resource(LogicalFont.java:187)
   at com.sun.t2k.LogicalFont.getSlotResource(LogicalFont.java:228)
   at com.sun.t2k.CompositeStrike.getStrikeSlot(CompositeStrike.java:91)
   at com.sun.t2k.CompositeStrike.getMetrics(CompositeStrike.java:137)
   at com.sun.javafx.font.PrismFontUtils.getFontMetrics(PrismFontUtils.java:31)
   at com.sun.javafx.font.PrismFontLoader.getFontMetrics(PrismFontLoader.java:439)
   at javafx.scene.text.Text.<init>(Text.java:129)
   at com.sun.javafx.scene.control.skin.LabeledText.<init>(LabeledText.java:30)
   at com.sun.javafx.scene.control.skin.LabeledSkinBase.<init>(LabeledSkinBase.java:128)
   at com.sun.javafx.scene.control.skin.ButtonSkin.<init>(ButtonSkin.java:46)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
   at javafx.scene.control.Control.loadSkinClass(Control.java:999)
   at javafx.scene.control.Control.access$500(Control.java:74)
   at javafx.scene.control.Control$12.invalidated(Control.java:918)
   at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:127)
   at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:161)
   at com.sun.javafx.css.StyleableStringProperty.set(StyleableStringProperty.java:71)
   at javafx.scene.control.Control$12.set(Control.java:910)
   at com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:59)
   at com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:31)
   at com.sun.javafx.css.StyleableProperty.set(StyleableProperty.java:62)
   at com.sun.javafx.css.StyleHelper.transitionToState(StyleHelper.java:807)
   at javafx.scene.Node.impl_processCSS(Node.java:6476)
   at javafx.scene.Parent.impl_processCSS(Parent.java:1127)
   at javafx.scene.control.Control.impl_processCSS(Control.java:1109)
   at javafx.scene.Parent.impl_processCSS(Parent.java:1134)
   at javafx.scene.Node.processCSS(Node.java:6444)
   at javafx.scene.Scene.doCSSPass(Scene.java:422)
   at javafx.scene.Scene.preferredSize(Scene.java:1210)
   at javafx.scene.Scene.impl_preferredSize(Scene.java:1260)
   at javafx.stage.Window.adjustSize(Window.java:185)
   at javafx.stage.Window.access$1000(Window.java:72)
   at javafx.stage.Window$10.invalidated(Window.java:707)
   at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:129)
   at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:163)
   at javafx.stage.Window.setShowing(Window.java:768)
   at javafx.stage.Window.show(Window.java:783)
   at javafx.stage.Stage.show(Stage.java:207)
   at myjavafx.MyJavaFX.start(MyJavaFX.java:44)
   at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:315)
   at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:174)
   at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:141)
   at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
   at com.sun.glass.ui.gtk.GtkApplication$2$1.run(GtkApplication.java:79)
   at java.lang.Thread.run(Thread.java:722)

SEVERE: javafx.scene.control.Control impl_processCSS The -fx-skin property has not been defined in CSS for Button[id=null, styleClass=button]


The source code is:
Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package myjavafx;

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

/**
 *
 * @author jrahman
 */
public class MyJavaFX extends Application {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        launch(args);
    }
   
    @Override
    public void start(Stage primaryStage) {
        primaryStage.setTitle("Hello World!");
        Button btn = new Button();
        btn.setText("Say 'Hello World'");
        btn.setOnAction(new EventHandler<ActionEvent>() {

            @Override
            public void handle(ActionEvent event) {
                System.out.println("Hello World!");
            }
        });
       
        StackPane root = new StackPane();
        root.getChildren().add(btn);
        primaryStage.setScene(new Scene(root, 300, 250));
        primaryStage.show();
    }
}
[/b]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo