IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaFX Discussion :

Fichier fxml dans netbeans


Sujet :

JavaFX

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Inactif
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Juin 2012
    Messages : 11
    Par défaut Fichier fxml dans netbeans
    boila,

    j'ai commencé à créer une interface javafx avec scene editor d'oracle.
    J'enregistre les fichiers au format fxml dans mon projet netbeans. Que se passe-t-il alors?

    Peut-on passer d'un stage à l'autre dans l'application et changer la scène au cours de l'interaction avec l'utilisateur?

    questions de débutant, je viens de débuter

    j'ai utilisé scene builder preview. Puis je l'ai chargé dans l'application netbeans.

    exception à l'exécution:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    init:
    Deleting: C:\Users\Mary\Documents\dev\syphotron\build\built-jar.properties
    deps-jar:
    Updating property file: C:\Users\Mary\Documents\dev\syphotron\build\built-jar.properties
    Duplicated project name in import. Project jfx-impl defined first in C:\Users\Mary\Documents\dev\syphotron\nbproject\jfx-impl.xml and again in C:\Users\Mary\Documents\dev\syphotron-Preloader\nbproject\jfx-impl.xml
    syphotron-Preloader.init:
    syphotron-Preloader.deps-jar:
    Updating property file: C:\Users\Mary\Documents\dev\syphotron\build\built-jar.properties
    syphotron-Preloader.compile:
    Copying 1 file to C:\Users\Mary\Documents\dev\syphotron-Preloader\build
    Copy libraries to C:\Users\Mary\Documents\dev\syphotron-Preloader\dist\lib.
    To run this application from the command line without Ant, try:
    C:\Program Files\Java\jdk1.7.0_04/bin/java -jar "C:\Users\Mary\Documents\dev\syphotron-Preloader\dist\syphotron-Preloader.jar"
    Deleting directory C:\Users\Mary\Documents\dev\syphotron-Preloader\dist\lib
    Detected JavaFX Ant API version 1.1
    syphotron-Preloader.jfx-deployment:
    syphotron-Preloader.jar:
    Compiling 1 source file to C:\Users\Mary\Documents\dev\syphotron\build\classes
    compile-single:
    run-single:
    Device "Mobile Intel(R) 4 Series Express Chipset Family" (\\.\DISPLAY1) initialization failed : 
    WARNING: bad driver version detected, device disabled. Please update your driver to at least version 8.15.10.2302
    juin 09, 2012 11:56:49 PM javafx.fxml.FXMLLoader logException
    Grave: Page language not specified.
    /C:/Users/Mary/Documents/dev/syphotron/build/classes/syphotron/LoadForm_1.fxml:13
      at javafx.fxml.FXMLLoader$Element.processEventHandlerAttributes(Unknown Source)
      at javafx.fxml.FXMLLoader$ValueElement.processEndElement(Unknown Source)
      at javafx.fxml.FXMLLoader.processEndElement(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at syphotron.ImageView.start(ImageView.java:17)
      at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl$3.run(Unknown Source)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
      at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:722)
     
    Exception in Application start method
    Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
    	at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
    	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(Thread.java:722)
    Caused by: javafx.fxml.LoadException: Page language not specified.
    	at javafx.fxml.FXMLLoader$Element.processEventHandlerAttributes(Unknown Source)
    	at javafx.fxml.FXMLLoader$ValueElement.processEndElement(Unknown Source)
    	at javafx.fxml.FXMLLoader.processEndElement(Unknown Source)
    	at javafx.fxml.FXMLLoader.load(Unknown Source)
    	at javafx.fxml.FXMLLoader.load(Unknown Source)
    	at javafx.fxml.FXMLLoader.load(Unknown Source)
    	at javafx.fxml.FXMLLoader.load(Unknown Source)
    	at javafx.fxml.FXMLLoader.load(Unknown Source)
    	at javafx.fxml.FXMLLoader.load(Unknown Source)
    	at javafx.fxml.FXMLLoader.load(Unknown Source)
    	at syphotron.ImageView.start(ImageView.java:17)
    	at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
    	at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
    	at com.sun.javafx.application.PlatformImpl$3.run(Unknown Source)
    	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    	at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
    	at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
    	... 1 more
    Java Result: 1
    BUILD SUCCESSFUL (total time: 8 seconds)

  2. #2
    Inactif
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Juin 2012
    Messages : 11
    Par défaut code
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    package syphotron;
     
    import javafx.application.Application;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Parent;
    import javafx.scene.Scene;
    import javafx.stage.Stage;
     
    public class ImageView extends Application {
     
        public static void main(String[] args) {
            Application.launch(ImageView.class, args);
        }
     
        @Override
        public void start(Stage stage) throws Exception {
            Parent root = FXMLLoader.load(getClass().getResource("LoadForm_1.fxml"));
            stage.setTitle("Image Viewer");
            stage.setScene(new Scene(root, 300, 275));
            stage.show();
        }
    }

  3. #3
    Rédacteur/Modérateur

    Avatar de bouye
    Homme Profil pro
    Information Technologies Specialist (Scientific Computing)
    Inscrit en
    Août 2005
    Messages
    6 900
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Information Technologies Specialist (Scientific Computing)
    Secteur : Agroalimentaire - Agriculture

    Informations forums :
    Inscription : Août 2005
    Messages : 6 900
    Billets dans le blog
    54
    Par défaut
    Hum... Page language not specified.

    Si tu as écrit du code en JavaScript ou un autre langage quelconque dans le FXML il faut faire des imports supplémentaires dans l'entête du fichier.
    Merci de penser au tag quand une réponse a été apportée à votre question. Aucune réponse ne sera donnée à des messages privés portant sur des questions d'ordre technique. Les forums sont là pour que vous y postiez publiquement vos problèmes.

    suivez mon blog sur Développez.

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning. ~ Rich Cook

  4. #4
    Inactif
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Juin 2012
    Messages : 11
    Par défaut attribut fx:controller
    Après avoir regardé la documentation, c'est l'attribut fx:controller qui manquait dans la balise englobante.
    Maintenant ça tourne:

    http://github.com/ibiiztera/ImageViewer/

    qui n'est qu'un test...

Discussions similaires

  1. Lecture/Ecriture sur fichier dans Netbeans
    Par NizarK dans le forum NetBeans
    Réponses: 15
    Dernier message: 12/12/2008, 10h33
  2. Réponses: 0
    Dernier message: 21/08/2008, 06h04
  3. fichier swf dans netbeans
    Par MaxGsm dans le forum NetBeans
    Réponses: 0
    Dernier message: 07/08/2008, 13h09
  4. deployer fichier .ear dans netbeans
    Par ceriise dans le forum Glassfish et Payara
    Réponses: 29
    Dernier message: 28/08/2007, 17h46
  5. [NetBeans] Ajouter un fichier class dans un projet
    Par Ashgenesis dans le forum NetBeans
    Réponses: 14
    Dernier message: 16/12/2005, 00h25

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo