4 Replies Latest reply on Aug 17, 2009 3:51 PM by philho

    JavaFX 1.1 to JavaFX 1.2 some Probs!!!

    843851
      Hello,
      i have a problem and i don´t know what it means
      please help me
      thanks
      WARNING * WARNING * WARNING * WARNING * WARNING
      An attempt has been made to add node to a new group without
      first removing it from its current group. See the class
      documentation for javafx.scene.Node for further information.
      This request will be granted temporarily but it will
      be refused in the future. Please change your code now.
      node=ImageView oldgroup=Group newgroup=Group
      Stack trace follows.
      java.lang.IllegalArgumentException
      at javafx.scene.Group$_SBECL.onChange(Group.fx:162)
      at com.sun.javafx.runtime.location.SequenceVariable.notifyListeners(SequenceVariable.java:157)
      at com.sun.javafx.runtime.location.SequenceVariable.setAsSequence(SequenceVariable.java:259)
      at com.sun.javafx.runtime.location.SequenceVariable.set(SequenceVariable.java:222)
      at com.sun.javafx.runtime.location.SequenceVariable.set(SequenceVariable.java:39)
      at com.sun.javafx.runtime.location.Bindings$BijectiveBinding$2.onChange(Bindings.java:156)
      at com.sun.javafx.runtime.location.AbstractLocation$1.onAction(AbstractLocation.java:220)
      at com.sun.javafx.runtime.location.AbstractLocation$1.onAction(AbstractLocation.java:217)
      at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:182)
      at com.sun.javafx.runtime.location.AbstractLocation.invalidateDependencies(AbstractLocation.java:254)
      at com.sun.javafx.runtime.location.SequenceVariable.notifyListeners(SequenceVariable.java:150)
      at com.sun.javafx.runtime.location.SequenceVariable.setAsSequence(SequenceVariable.java:259)
      at GUI.LogIn.javafx$run$(LogIn.fx:359)
      at GUI.LogIn.javafx$run$(LogIn.fx:359)
      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.sun.javafx.runtime.provider.GUIRuntimeProvider$1.run(GUIRuntimeProvider.java:65)
      at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run(SwingToolkit.fx:593)
      at java.awt.event.InvocationEvent.dispatch(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)
        • 1. Re: JavaFX 1.1 to JavaFX 1.2 some Probs!!!
          843851
          I forgott
          def album:Create_Set_GUI=new Create_Set_GUI();
          var album_erstellen_scene:Scene=Scene
          {
          content:[Hintergrund,logo,suchfeld,lupe,album.album_title,album.album_bild_pfad,album.album_beschreibung,album.album_pfad_Button
          ,album.album_hochladen_button,hochladen,hochladen_rec, album.album_status, favoriten,favoriten_rec,loeschen_rec,loeschen,
          album.album_header,album.album_header_2, album.album_bild_label, album.album_title_label, album.album_beschreibung_label,
          ImageView{image:album_image;  x:bind album_erstellen_rec.x;
                                     y:bind  album_erstellen_rec.y;}

          ]
          }
          def upload:Upload_GUI=new Upload_GUI();
          var bild_hochladen_scene:Scene=Scene
          {
          content:[Hintergrund,logo,suchfeld,lupe,favoriten,favoriten_rec,loeschen_rec,loeschen,album_erstellen_hover,album_erstellen_rec,
          upload.bild_header,upload.bild_header_2, upload.bild_hochladen_button, upload.bild_pfad_Button, upload.bild_status,
          upload.bild_title, upload.bild_title_label,
          ImageView{image:hochladen_image;  x:bind hochladen_rec.x;
                                     y:bind  hochladen_rec.y;}
          ]

          }
          var shit2:ImageView=ImageView
          {
          x:300
          y:300
          visible:true;
          image:bind Image{url: authentikation.shit;
                              height:200
                              width:200
                              }
          }
          var lupe_rec:Rectangle=Rectangle{
          fill:Color.web("#CD4400")
          x:250
          y:193

          width:50
          height:50
          onMouseClicked:function(e:MouseEvent):Void
          {
          authentikation.get_photos(suchfeld.text);
          shit2.visible=true;
          }
          }

          var main = Scene
          {
          content:[Hintergrund,
          album_erstellen_hover,album_erstellen_rec,hochladen,hochladen_rec,lupe,suchfeld,loeschen,
          favoriten,favoriten_rec,loeschen_rec,logo,anzeige_user_name,anzeige_icon,anzeige_voller_name,anzeige_ort,
          anzeige_upload_verbleibendekb,anzeige_upload_gebrauchtekb,anzeige_upload_gesamtkb,anzeige_ort_label,
          anzeige_upload_gesagmtkb_label,anzeige_upload_verbleibendekb_label,anzeige_voller_name_label,anzeige_upload_gebrauchtekb_label,lupe_rec,shit2]
          }
          scene_switching=login;

          Stage {
          title: "EasyKlickr - Einfache Verwaltung des Flickr-Account "
          width: 1100
          height: 750
          resizable:false
          scene: bind scene_switching;
          }
          • 2. Re: JavaFX 1.1 to JavaFX 1.2 some Probs!!!
            philho
            It is hard to understand your code without indentation. Try and use the CODE button above the text area please. I don't understand the *** either.

            Beside, the message is quite explicit: it seems you try to move a node (an ImageView) from a Group (its content sequence) to another one. I am not sure if your code fragment includes the culprit part.
            • 3. Re: JavaFX 1.1 to JavaFX 1.2 some Probs!!!
              843851
              Ok, thank you
              Yes i use a ImageView in two groups is that not allowed??
              How can i switch Scenes or is that not allowed in 1.2??
              • 4. Re: JavaFX 1.1 to JavaFX 1.2 some Probs!!!
                philho
                You cannot share a node between two groups or scenes.
                Either you use distinct but with identical content nodes, or you remove the node from group1 before adding it to group2.
                Note: two distinct ImageView can use the same Image (which is not a Node), so there is no real performance issue.