title: Can't set propertys of objects in an ObservableList
body: <p>In my main class I initialise a static object (lkw), which contains the public ObservableList (ladung). Now I want to manipulate the data in the list whith the methode ergebniss, which is located in the class Methoden. I call the methode ergebniss in my JavaFx Gui. It doesn't work. I don't get an error, but the X property is empty. Also removing an element (<code>Main.lkw.ladung.remove(j)</code>) doesn't work.
  What I do wrong?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p><strong>Code</strong>
  Class Main</p>
  
  <pre><code>public class Main extends Application{
  public static Lkw lkw=new Lkw();
  
  public static void main(String[] args) {
      javafx.application.Application.launch(Gui.class);
  }
  
  @Override
  public void start(Stage primaryStage) throws Exception {
      // TODO Auto-generated method stub
  
  }
  </code></pre>
  
  <p>Class Lkw</p>
  
  <pre><code>public class Lkw {
  private String name="";
  private int länge=0;
  private int breite=0;
  private int höhe=0;
  public ObservableList&lt;Ladung&gt; ladung=FXCollections.observableArrayList();
  
  public Lkw(String name, int länge, int breite, int höhe){
      this.name=name;
      this.länge=länge;
      this.breite=breite;
      this.höhe=höhe;
  }
  
  public String getName(){
      return name;
  }
  
  public void setName(String name){
      this.name=name;
  }
  
  public int getLänge() {
      return länge;
  }
  
  public void setLänge(int länge) {
      this.länge = länge;
  }
  
  public int getBreite() {
      return breite;
  }
  
  public void setBreite(int breite) {
      this.breite = breite;
  }
  
  public int getHöhe() {
      return höhe;
  }
  
  public void setHöhe(int höhe) {
      this.höhe = höhe;
  }
  
  public ObservableList&lt;Ladung&gt; getLadung() {
      return ladung;
  }
  
  public void setLadung(ObservableList&lt;Ladung&gt; ladung) {
      this.ladung = ladung;
  }
  </code></pre>
  
  <p>Class Ladung</p>
  
  <pre><code>public class Ladung {
  private int nr;
  private int länge = 0;
  private int breite = 0;
  private int höhe = 0;
  private int x = 0;
  private int y = 0;
  private int z = 0;
  private int raum = 0;
  private Rectangle farbe = new Rectangle(100, 50);
  
  public Ladung(int nr, int länge, int breite, int höhe) {
      this.nr = nr;
      this.länge = länge;
      this.breite = breite;
      this.höhe = höhe;
      this.farbe.setFill(new Color(Math.random(), Math.random(), Math.random(), 1));
  }
  
  public Ladung(int nr, int länge, int breite, int höhe, int raum, int x, int y, int z, Rectangle farbe) {
      this.nr = nr;
      this.länge = länge;
      this.breite = breite;
      this.höhe = höhe;
      this.raum = raum;
      this.x = x;
      this.y = y;
      this.z = z;
      this.farbe=farbe;
  }
  
  public int getLänge() {
      return länge;
  }
  
  public void setLänge(int länge) {
      this.länge = länge;
  }
  
  public int getBreite() {
      return breite;
  }
  
  public void setBreite(int breite) {
      this.breite = breite;
  }
  
  public int getHöhe() {
      return höhe;
  }
  
  public void setHöhe(int höhe) {
      this.höhe = höhe;
  }
  
  public int getX() {
      return x;
  }
  
  public void setX(int x) {
      this.x = x;
  }
  
  public int getY() {
      return y;
  }
  
  public void setY(int y) {
      this.y = y;
  }
  
  public int getZ() {
      return z;
  }
  
  public void setZ(int z) {
      this.z = z;
  }
  
  public int getNr() {
      return nr;
  }
  
  public void setNr(int nr) {
      this.nr = nr;
  }
  
  public int getRaum() {
      return raum;
  }
  
  public void setRaum(int raum) {
      this.raum = raum;
  }
  
  public Rectangle getFarbe() {
      return farbe;
  }
  
  public void setFarbe(Rectangle farbe) {
      this.farbe = farbe;
  }
  </code></pre>
  
  <p>This is the class with some static methods</p>
  
  <pre><code>public class Methoden {
  public static int einlesen(String pfad) {
      int ret=0;
      String zeile = "";
      String[] daten = null;
      FileReader fr = null;
      try {
          fr = new FileReader(pfad);
          BufferedReader br = new BufferedReader(fr);
          zeile = br.readLine();
          daten = zeile.split(" ");
          Main.lkw.setLänge(Integer.valueOf(daten[1]));
          Main.lkw.setBreite(Integer.valueOf(daten[2]));
          Main.lkw.setHöhe(Integer.valueOf(daten[3]));
          zeile = br.readLine();
          int j=0;
          while (zeile != null) {
              daten = null;
              daten = zeile.split(" ");
              Main.lkw.ladung.get(j).setX(Integer.valueOf(daten[5]));
              Main.lkw.ladung.get(j).setY(Integer.valueOf(daten[6]));
              Main.lkw.ladung.get(j).setZ(Integer.valueOf(daten[7]));
              Main.lkw.ladung.get(j).setRaum(Integer.valueOf(daten[4]));
  
              zeile = br.readLine();
          }
          br.close();
          fr.close();
          if(Main.lkw.getLadung().size()==0){
              ret=-1;
          }
          for(int i=0;i&lt;Main.lkw.getLadung().size();i++){
              System.out.println(Main.lkw.getLadung().get(i));
              System.out.println(Main.lkw.getLadung().get(i).getRaum());
              if(Main.lkw.getLadung().get(i).getRaum()!=1){
                  ret=-1;
                  System.out.println("achtung!!!!");
              }
          }
      } catch (IOException e) {
          System.err.println(e.getMessage() + " " + e.getClass());
      }
      return ret;
  }
  </code></pre>
  
  <p>I call the methode ergebniss from a JavaFx Gui class.</p>