Scene Builder and NetBeans

2 Questions:
1) When I create a NetBeans project that I want to combine with a Scene Builder fxml file, what project type do I need to create (i.e., JavaFX or FXML)? Regardless of the project type I select, I don't see the same structure as when I load the sample projects.
2) I, perhaps incorrectly, assumed that the purpose of binding the fxml file to the Java controller class was so that a shell of controller methods would would be created automatically. I have not seen that happen. Is my assumptions incorrect>
Thanks,
Jerry

Hi,
The following works for me - although it is a bit hacky: remove the text of the tab, and instead put the text as a rotated graphic. Then set the tab max height property of the tab pane to allow the tab thumb to grow.
To make it work I also had to wrap the rotated text in a Group itself wrapped inside a StackPane, and then I had to set the pref height of that stack pane explicitly.
Here is my FXML - create with SceneBuilder:
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>
<AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml">
  <children>
    <TabPane id="tabPane1" layoutX="99.0" layoutY="90.0" prefHeight="200.0" rotateGraphic="true" side="LEFT" tabClosingPolicy="UNAVAILABLE" tabMaxHeight="2000.0">
      <tabs>
        <Tab id="tab1" text="">
          <content>
            <AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
          </content>
          <graphic>
            <StackPane id="StackPane" minHeight="-Infinity" minWidth="-Infinity" prefHeight="160.0">
              <children>
                <Group id="Group">
                  <children>
                    <Label id="label1" rotate="90.0" text="This is a long tab name" />
                  </children>
                </Group>
              </children>
            </StackPane>
          </graphic>
        </Tab>
        <Tab id="tab2" text="">
          <content>
            <AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
          </content>
          <graphic>
            <StackPane id="StackPane" minHeight="-Infinity" minWidth="-Infinity" prefHeight="160.0">
              <children>
                <Group id="Group">
                  <children>
                    <Label id="label1" rotate="90.0" text="This is a long tab name" />
                  </children>
                </Group>
              </children>
            </StackPane>
          </graphic>
        </Tab>
      </tabs>
    </TabPane>
  </children>
</AnchorPane>Maybe there exist more elegant ways to do this using CSS...
Hope this helps,
--daniel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Packaging Scene Builder  with Netbeans ...

    In the old world of Swing the GUI builder (matisse ?) was packaged and bundled with Netbeans.
    In the new world of JavaFX it appears that "Scene Builder" is a standalone tool. Although, Netbeans can be configured to invoke SceneBuilder it appears to be a bit weird. . It's not clear as to why we have ended up with this new arrangement ?.
    /rk

    SceneBuilder works with lots of different IDEs and without an IDE at all.
    I don't think matisse (?) did (though I never used it).
    I think that's an advantage.
    If you wished, you could file a request against the NetBeans project for them to co-bundle SceneBuilder.
    The plan for NetBeans 8 (http://wiki.netbeans.org/EditorPlan80#JavaFX_2) has an item:
    "Ongoing support of SceneBuilder interoperability plugin (?, ? days)"
    I think the first question mark means no owner has been assigned the task and the second question mark means nobody knows how long it would take.

  • Diffrent coordinates between Scene builder and javafx

    Hello,
    I'm building an image using javafx, i don't want to use fxml, but i tried to use scene builder to help me identify my object corrdinates.
    I have to add a background picture and to add some other graphic object, when using exactly same coordinates for my background picture and graphic object (got from generated fxml) i did not find the same corrdinates?
    Is there any clear reason.
    Help :)

    Thank you jrguenther! yes, I the input images with File>Import>Media menu
    But, how I program a piece (image png) to move with the mouse click on the board?
    My project is a game.
    Please!

  • Scene builder and nodes position

    Hi,
    I've created form using scene builder, additionaly from java code I want to draw some shapes on this form and I need positions of nodes.
    How can I check that? Also I need to be informed when user resizes the window to compute new positions of nodes.
    Thanks for your help.
    Lukasz

    On the Scene or Stage you can add listeners to the height and width properties.
    scene.heightProperty().addListener(windowResized);
    scene.widthProperty().addListener(windowResized);
        private static ChangeListener windowResized = new ChangeListener() {
            @Override
            public void changed(ObservableValue arg0, Object arg1, Object arg2) {
                //code to handle window resizing
        };thanks
    jose

  • JavaFX and NetBeans Integration Request

    How about it team? Please integrate SB into the next release of NetBeans (7.4.1).
    Yes, I have seen the pages at: Using JavaFX Scene Builder with Java IDEs: Using Scene Builder with NetBeans IDE | JavaFX 2 Tutorials and Documentation
    OK so I am able to call SB from inside the NetBeans 7.4 IDE.  This is not integration. Its a shortcut. I mean, why do we have two separate tools? NetBeans IDE and SceneBuilder. We don't pop open SQLDeveloper when we work on queries, so why pop open SB?
    Integration would be that the capabilities of the SceneBuilder would be available IN the IDE such as they are for Swing or for databases.    Integration means you would have the palette available with the JavaFx components.  It would be the current version of SB. ( When SB2 comes out, it would have all the functionality of SB2 )
      From reading the scant information out there, SB2 is in development, why not integrate it into the IDE and make it one spot to do your development?  Take JavaFx mainstream and integrate it into the IDE for real.

    The Scene Builder team is working to create a product that integrates well with many IDEs, and NetBeans is one of them. As you might have heard from the last JavaOne, we are working on an API, called Scene Builder Kit, which will allow the integration of Scene Builder panels and functionality directly into the GUI of an IDE.
    Based on this, we hope to collaborate with the NetBeans team -- and with teams from other IDEs -- to provide as tight an integration as we can, but ultimately this is a partnership which requires work from both the IDEs and SB teams.
    As crucial as we see a tight IDE integration for our users' productivity, we feel that a SB standalone tool is also needed for those of our users who do not wish to use an IDE because, e.g., they focus solely on the layout and styling of a GUI.
    Thanks for your feedback, please keep it coming, this helps us.

  • Scene Builder & Date Picker

    Hi All
    Very quick question. I've just start to get involved in the java world, and have started to look at JavaFX 2 and the Scene Builder. Scene Builder looks very good, but I can't see a Date Picker control at all. I can see lots of examples for using a date picker, but none with with Scene Builder or FXML.
    Is this not possible at the moment?
    Thanks
    Andy Baptie

    In case anyone else comes up against this issue, I've got a bit further with it although it's not perfect.
    I've use jFXtras
    This was all done on a Mac.
    Open up the Scene Builder Package, navigate to Contents\Java and copy jfxtras-labs-0.1.jar in the folder.
    Right Click your .fxml file in Netbeans, and select edit.
    Create an entry for you DatePicker
    eg
    <CalendarTextField prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="0" />
    add the required import
    <?import jfxtras.labs.scene.control.CalendarTextField?>
    After saving, you can open the fxml in Scene Builder and carry on as usual
    Cheers
    Andy

  • Scene Builder: cannot edit when I embed a custom control!

    Hi guys, I'm having an issue with Scene Builder and embedded custom controls...
    I have a LoginPanel .fxml/.java module, which contains two re-usable custom controls I've built:
    * StatusZone .fxml/.java
    * LanguageSelector .fxml/.java
    The application runs.
    However, I can't open LoginPanel.fxml to edit it with SceneBuilder v1.1 (developer preview).
    To be specific, in LoginPanel.fxml, I have this data:
    <StatusZone fx:id="statusZone" />
    <LanguageSelector fx:id="languageSelector" />
    SCENARIO 1
    -- LoginPanel.fxml --
    <?import kalungcasev2.view.StatusZone?>
    <?import kalungcasev2.view.LanguageSelector?>
    I get:
    Warning: File 'LoginPanel.fxml' contains references to types that could not be loaded.
    Missing types are [kalungcasev2.view.StatusZone]
    I can click 'Set up classpath', but no matter which folder I choose, it doesn't seem to fix the problem.
    SCENARIO 2:
    -- LoginPanel.fxml --
    <?import kalungcasev2.view.*?>
    I get:
    Warning: File 'LoginPanel.fxml' contains references to types that could not be loaded.
    Missing types are: [StatusZone, LanguageSelector]
    I can click 'Set up classpath', but no matter which folder I choose, it doesn't seem to fix the problem.
    How do I fix this?

    Hi,
    If no ClassLoader is configured in the FXMLLoader, then the FXMLLoader will try to load the
    classes using the System/Context class loader.
    This works well in the context of an application where everything is in the system class loader.
    In SceneBuilder however - your classes will not be in the System class loader, but in a special
    URL class loader that SceneBuilder created for your FXML file.
    SceneBuilder sets this ClassLoader on the FXMLLoader that loads your top FXML file,
    but it can't do anything for the instances of FXMLLoader that your own code creates.
    Therefore - it's best to configure your FXMLLoader with the appropriate class loader,
    which is usually the class loader that loaded your custom type.
    See https://javafx-jira.kenai.com/browse/DTL-5177 for more details.
    -- daniel
    Edited by: daniel on Apr 25, 2013 7:33 AM
    Sorry - to be more precise:
    loader.setClassLoader(this.getClass().getClassLoader());
    is the correct line.

  • [SOLVED]Scene Builder 2.0 not opening

    When i open the JavaFX Scene Builder 2.0,nothing happens.
    I'm using Windows 7 with JDK 8(64Bit).

    Hi Cyberboy,
    Have you verified the problem recurs if you take it out of the exclusion list again?
    I don't have any problem with BitDefender, Scene Builder and Win7.
    Have you seen this solution:
    http://deltadata.wordpress.com/2013/12/25/javafx-scene-builder-failed-to-create-jvm-fix/ :
    1.Search for regedit.exe and run it.
    2.Go to HKEY_CURRENT_USER\Software\JavaSoft\Prefs\com\oracle\javafx\scenebuilder\/J/V/M/User/Options
    3.Edit the value from 999m to 512m

  • I18n in scene builder

    I'm trying to internationalize a JavaFX 2.2 app.
    When I set the resource file (.properties) in Scene Builder, I can see labels with text in selected language. But when I try to run it, this gives me the following error:
    No resources specified.
    file:/C:/Users/xxx/dist/I18n.jar!/org/osl/javafx/InterfaceScn.fxml:34
    and line 34 in my fxml file is:
    *<Label id="lineNumberValue" layoutX="343.0" layoutY="63.0" text="%lineNumber" />*
    in .properties file lineNumber key is set and as I have already mentioned I can see in scene builder that it takes value from the .properties file.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    If I remove this .properties resource from within scene builder and set "*-fx-font-family: "Raavi";*" in my stylesheet, it works fine but now I can't see the actual words but boxes in scene builder.
    I mean now the app runs fine and I can read text of labels in that other language but its very difficult to design interface in scene builder.
    Isn't there any way by which I can see values from .properties file while designing the interface and it also let the app to run.
    I have tried putting localizing code in my main class by setting Locale and then using ResourceBundle to load my .properties resource by that didn't work either.
    Thanks, for any suggestion or example code. Cheers.

    but that's my point. " *Preview > Internationalization > Set Resource and select your resource bundle*" set the correct values from my resource file. But on running the app I get the following error.
    I figured out that it is not the declaration of resource file in fxml that is causing this error but the rather it is the line where I set the value like:
    *<Label id="lineNumberValue" layoutX="343.0" layoutY="63.0" text="%lineNumber" />*
    To me it looks like, javafx is unable to find the resource file at run time. But If I remove the *'%***'* thing and then use css for setting font family, It loads the interface without any issue.
    I mean I didn't get any error for loading resource-bundle or anything.
    This is the code that I'm using to load the resource file:
    Locale myLocale = new Locale("pa-IN");
    ResourceBundle rb = ResourceBundle.getBundle("org.osl.javafx.interfaceScn", myLocale );
    But thanks for documentation links. I will look into sample app, if that can give me some hint.
    And here is the complete error:
    run:
    No resources specified.
    file:/C:/Users/xxx/dist/I18n.jar!/org/osl/javafx/InterfaceScn.fxml:33
    at javafx.fxml.FXMLLoader$Element.processPropertyAttribute(FXMLLoader.java:305)
    at javafx.fxml.FXMLLoader$Element.processInstancePropertyAttributes(FXMLLoader.java:197)
    at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:588)
    at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2430)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2136)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2028)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2742)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2721)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2707)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2694)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2683)
    at org.osl.javafx.I18n.start(I18n.java:44)
    at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
    at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
    at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
    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$3$1.run(WinApplication.java:73)
    at java.lang.Thread.run(Thread.java:722)
    Sep 21, 2012 9:19:50 AM org.osl.javafx.I18n start
    SEVERE: null
    javafx.fxml.LoadException: No resources specified.
         at javafx.fxml.FXMLLoader$Element.processPropertyAttribute(FXMLLoader.java:305)
         at javafx.fxml.FXMLLoader$Element.processInstancePropertyAttributes(FXMLLoader.java:197)
         at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:588)
         at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2430)
         at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2136)
         at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2028)
         at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2742)
         at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2721)
         at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2707)
         at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2694)
         at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2683)
         at org.osl.javafx.I18n.start(I18n.java:44)
         at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
         at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
         at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
         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$3$1.run(WinApplication.java:73)
         at java.lang.Thread.run(Thread.java:722)

  • Scene Builder Inspector

    I am using Scene Builder and I would like to replicate the inspector look.
    My questions:
    1) Are Padding, size, position areas ...etc panels within a Scroll Pane or are just two separators with a label in between ? It looks like a Swing TitledBorder Jpanel.
    2) In case of panels, what has been used and how to set a title ?
    3) Is there a naming convention for fx:id field? I have only find some examples all written in lowercase such as "maintabbedpane".
    Thanks

    acepsut wrote:
    I am using Scene Builder and I would like to replicate the inspector look.
    My questions:
    1) Are Padding, size, position areas ...etc panels within a Scroll Pane or are just two separators with a label in between ? It looks like a Swing TitledBorder Jpanel.It's a Label over an HBox which is squeezed by setting its maxHeight to a little value.
    Something close to this:
    <StackPane prefHeight="-1.0" xmlns:fx="http://javafx.com/fxml">
    <children>
    <HBox maxHeight="2.0" prefHeight="-1.0" prefWidth="-1.0" style="-fx-background-color: gray;-fx-background-insets: -1 -17 1 -17, 0 -17 1 -17;" />
    <Label style="-fx-font-weight: bold;-fx-background-color: white;-fx-padding: 0 6 5 6;" text="Title" />
    </children>
    </StackPane>
    >
    2) In case of panels, what has been used and how to set a title ?Will try to find out.
    >
    3) Is there a naming convention for fx:id field? I have only find some examples all written in lowercase such as "maintabbedpane".I am not aware of any.
    fx:id can be considered as java variable name.
    So using camel case seems natural to me.
    Eric

  • Scene Builder 1.0 will not start

    Hi. For a number of months I've been using Scene Builder 1.0 (BuildInformation = Version: 1.0-b50, Changeset: 22db15834430 Date = 2012-08-07 16:33) on a Windows 7 system. However, it has been about a month since I last used Scene Builder. Today, I tried to use Scene Builder and it would not start. No error message was displayed. I uninstalled Scene Builder and reinstalled it... that did not help.
    I noticed the logging.properties file in the "bin" directory. This file contained: java.util.logging.FileHandler.pattern = %t/scenebuilder.log. So, I looked in the system temp directory... no log file.
    The JRE (used by my browsers, etc.) has been updated within the last month, but I am guessing Scene Builder is isolated from any JRE changes, right?
    I downloaded and installed Scene Builder 1.1 (pre-release). Fortunately, Scene Builder 1.1 starts.
    However, I would still like to know why Scene Builder 1.0 does not start. Any ideas on how to troubleshoot the problem?
    Thanks!
    Chris

    Glad it's not just me...
    I had the same problem.  Either it downloaded a patch and fixed itself, or this worked:
    Go to Control Panel / Add / remove programs         (in Control Panel / all control panel items / Programs and Features / Add remove programs)
    Right click on Adobe Reader and select Change.
    Choose Repair
    This appears to have reinstalled the Core DLL file, and it seems to be working normally now.
    Good luck

  • Why does Scene Builder constantly create new instances of Nodes?

    Hi,
    I thought I had a simple idea for creating a control that would let me get some of the behavior of a card pane.  This is the entire control:
    import javafx.beans.property.BooleanProperty;
    import javafx.beans.property.SimpleBooleanProperty;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.scene.Node;
    import javafx.scene.Parent;
    import javafx.scene.layout.StackPane;
    public class Card extends StackPane {
        private final BooleanProperty active = new SimpleBooleanProperty();
        public final BooleanProperty activeProperty() {return active;}
        public final boolean isActive() {return active.get();}
        public final void setActive(boolean active) {this.active.set(active);}
            visibleProperty().bind(active);
            managedProperty().bind(active);
            active.addListener(new ChangeListener<Boolean>() {
                @Override
                public void changed(ObservableValue<? extends Boolean> observable,
                                    Boolean old,
                                    Boolean active) {
                    System.out.println(toString() + " active changed to: " + active);
                    if(active) {
                        Parent parent = getParent();
                        if(parent != null) {
                            System.out.println("Parent is: " + parent.toString());
                            parent.getChildrenUnmodifiable().forEach(Card.this::deactivateIfCard);
                        else {
                            System.out.println("Parent is null.");
        private void deactivateIfCard(Node node) {
            if(node != this && node instanceof Card) {
                Card card = (Card) node;
                card.setActive(false);
    The idea is pretty simple; extend StackPane, add an active property, bind the visible and managed properties of the pane to the active property, and, whenever the active property is changed to true, iterate sibling nodes de-activating any siblings that are also of the type Card.
    However, this doesn't work with Scene Builder.  While trying to debug, I created an ExtStackPane:
    import javafx.collections.ListChangeListener;
    import javafx.scene.Node;
    import javafx.scene.layout.StackPane;
    public class ExtStackPane extends StackPane {
            getChildren().addListener((ListChangeListener<Node>) c -> {
                System.out.println("ExtStackPane children change: " + c.toString());
    All this does is log list change events.  However, I was very surprised by the output when working in Scene Builder.  I added both controls to Scene Builder and did the following:
    0) Added an ExtStackPane
    1) Added a Card to the ExtStackPane
    2) Added another Card to the ExtStackPane
    3) Added a Label to the first Card
    4) Added a Label to the second Card
    5) Changed the text of the first Label to Hello
    6) Changed the text of the second Label to World
    7) Set the first Card to active
    8) Set the second Card to active
    I get the following output:
    1)
    ExtStackPane children change: { [Card@5b9067b3] added at 0 }
    2)
    ExtStackPane children change: { [Card@6b6328bd] added at 0 }
    ExtStackPane children change: { [Card@6aca8cc5] added at 1 }
    3)
    ExtStackPane children change: { [Card@3b7bc340] added at 0 }
    ExtStackPane children change: { [Card@1879819e] added at 1 }
    4)
    ExtStackPane children change: { [Card@60ffed67] added at 0 }
    ExtStackPane children change: { [Card@64955a14] added at 1 }
    5)
    ExtStackPane children change: { [Card@5dc96bc4] added at 0 }
    ExtStackPane children change: { [Card@40667c26] added at 1 }
    6)
    ExtStackPane children change: { [Card@164770fa] added at 0 }
    ExtStackPane children change: { [Card@7decebbf] added at 1 }
    7)
    Card$1@f4f4850 active changed to: true
    Parent is null.
    ExtStackPane children change: { [Card@27442c8b] added at 0 }
    ExtStackPane children change: { [Card@643d810e] added at 1 }
    8)
    Card$1@4877c67b active changed to: true
    Parent is null.
    ExtStackPane children change: { [Card@7e8a473e] added at 0 }
    Card$1@2b4497c1 active changed to: true
    Parent is null.
    ExtStackPane children change: { [Card@5df6c8cc] added at 1 }
    This is what things look like in Scene Builder:
    Does Scene Builder recreate the entire hierarchy every time I make a small change?  Here's an application that does the same as the manual steps I performed in Scene Builder:
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.stage.Stage;
    public class CardApplication extends Application {
        @Override
        public void start(Stage primaryStage) throws Exception {
            ExtStackPane stackPane = new ExtStackPane();
            // 1
            Card card1 = new Card();
            stackPane.getChildren().add(card1);
            // 2
            Card card2 = new Card();
            stackPane.getChildren().add(card2);
            // 3
            Label label1 = new Label();
            card1.getChildren().add(label1);
            // 4
            Label label2 = new Label();
            card2.getChildren().add(label2);
            // 5
            label1.setText("Hello");
            // 6
            label2.setText("World");
            primaryStage.setScene(new Scene(stackPane));
            primaryStage.setTitle("Card Application");
            primaryStage.setWidth(600);
            primaryStage.setHeight(400);
            primaryStage.show();
            // 7
            card1.setActive(true);
            // 8
            card2.setActive(true);
    The output when running the above is:
    1)
    ExtStackPane children change: { [Card@6dfaa767] added at 0 }
    2)
    ExtStackPane children change: { [Card@6aa2c411] added at 1 }
    7)
    Card$1@1abf7511 active changed to: true
    Parent is: ExtStackPane@41993867[styleClass=root]
    8)
    Card$1@5733cd2 active changed to: true
    Parent is: ExtStackPane@41993867[styleClass=root]
    Card$1@1abf7511 active changed to: false
    The behavior is obviously a lot different than when I'm working with the control in Scene Builder.  Can anyone explain to me what Scene Builder is doing to change the behavior of my Card control so much?  Does my Card control break some rule(s) I'm not aware of?

    I think you're confused about what SceneBuilder is doing.
    SceneBuilder is a design tool, used by the programmer (not the end user) to generate part of the code that is used to execute the application. (Specifically, it generates the FXML code that is parsed by the FXMLLoader to create and configure objects that are typically part of the scene graph.)
    While you are using SceneBuilder to create the code, it generates a mock-up of what the UI will look like, if the generated FXML were to be loaded and displayed. This mock-up is not supposed to be an identical view of what the end user will see, but an aid to you, as the programmer, to generate the code you want.
    So, for your Accordion/TitledPane example, in the mock-up that SceneBuilder displays, the *selected* titled pane is always displayed expanded. This enables you to drag and drop items into it, and to configure it in other ways. If you uncheck the "expanded" checkbox in the properties pane, then it remains expanded in the mock-up so that you can continue to configure it. However, this property is not ignored: the state of those checkboxes is respected in the FXML file that is generated. So when you hit "save" in SceneBuilder, the generated fxml will contain TitledPane element with expanded="true" if the check box is checked, and expanded="false" if the check box is unchecked. (SceneBuilder will of course also enforce the rule that only one TitledPane in an Accordion can be expanded.)
    Similarly, for your custom control, you should be able to set it up so SceneBuilder displays the "active" property in the check box. If you uncheck that property, so active=false, that will be respected in the fxml and when you execute the application, active will be set to false, and so by your binding, visible will be set to false and the component won't display. But the mock-up in SceneBuilder will (of course) still display your component, because it would be extremely difficult for you to configure a component that didn't appear in the programming tool.
    In fact, there's no real reason for SceneBuilder to create any objects that you are configuring at all. It could just try to figure out what they look like and render a depiction of them on a canvas, for example. That's probably much (much) more difficult than instantiating them and the authors of SceneBuilder apparently chose to write SceneBuilder in a way that re-instantiated the controls many times. But that has absolutely nothing to do with what happens when you execute the application and it makes no sense at all to compare the two.

  • FX 1.0 Scene Builder beta samples won't run in Netbeans

    Hi,
    I downloaded samples that are added to JavaFX Scene Builder from: http://download.oracle.com/otn-pub/java/javafx_scenebuilder/1.0/javafx_scenebuilder_samples-1_0-beta-b32-26_mar_2012.zip
    I imported it to netbeans ide and then I tried to run project, when I came across problem:
    com.sun.javafx.fxml.PropertyNotFoundException: Property "styleClass" does not exist or is read-only.
    Could you help me with this issue?

    Same problem for me...with Fx 2.0.3 (didn't try 2.1.0 beta)
    Solved this way in fxml file:
    (...some code...)
    <Button id="buttonSearch" contentDisplay="GRAPHIC_ONLY" maxHeight="32.0" maxWidth="32.0" minHeight="32.0" minWidth="32.0" prefHeight="32.0" prefWidth="32.0" AnchorPane.bottomAnchor="6.0" AnchorPane.rightAnchor="114.0" >
    <styleClass>
    <String fx:value="buttonSearch"/>
    </styleClass>
    </Button>
    (...some code...)
    and in css file:
    .buttonSearch {
         -fx-graphic: url("images/question.png");
         -fx-content-display: graphic-only;
    I load the css file in my main():
    stage.getScene().getStylesheets().add("MyApplication/test.css");
    just before stage.show();
    Edit:
    With the 2.1.0 developper preview there's no exception using styleClass()...

  • Netbeans 7.2.1 JavafxApplication JavaFX Scene Builder Error: Cause is null

    Hi.
    I'm using windows 7 x32, Netbeans IDE 7.2.1, JavaFX Scene Builder 1.0
    http://www.gop.edu.tr/errimage/javafxerr10.png
    http://www.gop.edu.tr/errimage/javafxerr11.png
    http://www.gop.edu.tr/errimage/javafxerr12.png
    http://www.gop.edu.tr/errimage/javafxerr13.png
    http://www.gop.edu.tr/errimage/javafxerr14.png
    Open File Failed
    Error loading file 'D:/cihan/Belgelerim/NetBeansProjects/JavaFXApplication6/src/javafxapplication6/Sample.fxml'.
    Cause is null

    Surprising. Your hardware should run Scene Builder without any trouble.
    With Java 7 U5 I run SceneBuilder 1.0 b44 on Win XP 32-bit and 1 G of RAM, with -Xmx1024m.
    Aren't you facing an issue with Java ? do you run successfully other Java applications of a comparable size ?
    You may also download the Scene Builder samples: according you've Ant and FX handy you can run them command line.
    For what is about removing or modifying the -Xmx option the answer is no, this can't be done in this release.
    Regards

  • Libraries and JAR files in netbeans... how to build and deploy a project??

    Hi guys,
    <p>
    I'm having a problem deploying my project. I have created a project structure as so:
    </p>
    <p>
    CLOGE 1.0
    |_Source Packages
    |  |_rdemo
    |    |_ClogeGUI.java [main]
    |    |_ClogeRScript.java
    |_Libraries
       |_Swing Layout Extensions - swing-layout-1.0.jar
       |_C:\CLOGE\JRclient [folder structure of classes]
       |  |_META-INF
       |  |_org.rosuda.JRclient
       |_C:\CLOGE\svgSalamander-tiny [folder structure of classes]
       |  |_META-INF
       |  |_com.kitfox.svg
       |  |_...
       |_JDK 1.6 (Default)
    </p>
    <p>
    Now I can build and run the project in Netbeans (version 5.5) and everything operates as it should. However, if I navigate to the dist folder of the project to the CLOGE_1.0.jar file via the Windows XP Command Prompt and execute "java -jar "CLOGE_1.0.jar", I get this error:
    </p>
    <p>
    Exception in thread "main" java.lang.NoClassDefFoundError: org/rosuda/JRclient/RSrvException<br/>
      at rdemo.ClogeGUI.clogeRScript(ClogeGUI.java:134)<br/>
      at rdemo.ClogeGUI.main(ClogeGUI.java:259)<br/>
    </p>
    <p>
    What do I have to do, so I can simply double-click the CLOGE_1.0.jar file and the project runs?
    </p>
    <p>
    Many thanks,<br/>
    Chris
    </p>
    Edited by: raistrick on Oct 12, 2007 4:49 AM

    Wasn't contracted. Wasn't paid. Wasn't the main focus of the software ;) - I was asked to do it for my technical expertise in statistics and bioinformatics... anyone else here mind giving me some hints other than this unspeakably pathetic excuse for a programmer.
    (by the way "jwenting", if you call yourself a professional and take that attitude to other programmers you won't be in a company very long! Don't jump to assumptions and don't use the internet as some portal to exercise anger that women don't find you attractive and all you have to be cocky about is programming, it's pathetic. Grow up please.
    What I am trying to work out about the answer above, is why. It could mean (1) that you don't know the answer and shunning me so is some poor attempt to save your diminishing ego, which from reading your other posts may be true. It could mean (2) you can't be arsed, which is more likely the case, but then one has to ask why the hell you came on here in the first place. Do you get a kick out of this? Is this your claim to fame - a java forum silver member?? It's not like I wasn't polite or clear in my explanation. Did some unqualified individual steal your job from you once upon a time so all "newbies" thereafter were a target for your pent up aggression? If so, don't worry I am not gunning for your position at all!)
    Many thanks to anyone who can provide a solution. I doubt this is a hard problem to solve and I'd be very grateful if anyone could point me in the direction of an answer. jwentig is quite right, I am not capable of such a task. I'm not a liar, however.
    Edited by: raistrick on Oct 12, 2007 7:25 AM

Maybe you are looking for