[nbdev] javafx.fxml.LoadException: java.lang.ClassNotFoundException:

  • From: "androidelp" < >
  • To:
  • Subject: [nbdev] javafx.fxml.LoadException: java.lang.ClassNotFoundException:
  • Date: Fri, 28 Sep 2012 11:43:04 -0400

Hello Fellas,

I'm Brazilian, and i'm great problem.

I have Netbeans 7.2 and scene builder 1.0.

I use Javafx2.

I create code:



Code:
private Parent replaceSceneContent(String fxml) throws Exception {
        Parent page = (Parent) FXMLLoader.load(getClass().getResource(fxml));
        Scene scene = stage.getScene();
        if (scene == null) {
            scene = new Scene(page, 700, 550);
            
scene.getStylesheets().add(getClass().getResource("/form_estilizado1/novoxml.css").toExternalForm());
            stage.setScene(scene);
        } else {
            stage.getScene().setRoot(page);
        }
        stage.sizeToScene();
        return page;
    }



for execute into tray:


Code:
  ActionListener listener = new ActionListener() {
             
                  @Override
                  public void actionPerformed(java.awt.event.ActionEvent e) {
                      
                      try {
                          
replaceSceneContent("/form_estilizado1/Novoxml.fxml");
                      } catch (Exception ex) {
                          
                          JOptionPane.showMessageDialog(null,"teste: "+ex);
                          
                          
                      }
                  }

              };



fxml created in scene builder:



Code:

<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import java.net.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.effect.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>

<AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" 
styleClass="mainFxmlClass" xmlns:fx="http://javafx.com/fxml" ;
fx:controller="gerenciador.de.tarefas.Novoxmlcontrolador">
  <children>
    <ImageView fx:id="img_randow" fitHeight="110.25" fitWidth="147.0" 
layoutX="153.0" layoutY="171.0" pickOnBounds="true" preserveRatio="true" />
    <TextField fx:id="text1" layoutX="217.0" layoutY="68.0" prefWidth="200.0" 
/>
    <Label fx:id="trocar" layoutX="287.0" layoutY="157.0" text="Trocar" />
    <Button fx:id="execut" layoutX="278.0" layoutY="226.0" 
mnemonicParsing="false" prefHeight="31.0" prefWidth="63.0" text="Executar" />
  </children>
  <stylesheets>
    <URL value="@novoxml.css" />
  </stylesheets>
</AnchorPane>






But when I run the program and click on the trayicon menu system returns me 
the following error:


javafx.fxml.LoadException: java.lang.ClassNotFoundException:

I searched the internet and heard that may be a bug. most do not know if this 
happens to me. [Question]






[nbdev] javafx.fxml.LoadException: java.lang.ClassNotFoundException:

androidelp 09/28/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close