0

I have this method in my Dialog class:

public static void hide(){
    isOpen = false;
    Main.PAGE.getChildren().removeAll(Main.PAGE.getChildren());
    Main.PAGE.getChildren().add(Main.ROOT);
}

I tried to run it in Samsung TabS and LG Leon phone and it worked but when I tried to run it in my Samsung GT-N5100 it throws a StackOverFlow Error.

Why?

Walker
  • 307
  • 4
  • 15
  • 3
    This might be related to the following question: http://stackoverflow.com/questions/34752754/java-lang-stackoverflowerror-when-pressing-fx-combobox-on-android – Joeri Sykora Apr 12 '16 at 06:09
  • 1
    (1) Have you tried replacing `Main.PAGE.getChildren().removeAll(Main.PAGE.getChildren())` with `Main.PAGE.getChildren().clear()`? (Most probably unrelated to the problem) (2) It would help if you provided the actual stack trace of the exception. – Nikos Paraskevopoulos Apr 12 '16 at 08:00
  • @NikosParaskevopoulos, I tried it, but it didn't worked! Thanks anyway. :) – Walker Apr 12 '16 at 09:32
  • @JoeriSykora, thank you sir! it worked! :) – Walker Apr 12 '16 at 09:42

0 Answers0