Results 1 to 2 of 2
  1. #1
    slider57 is offline Member
    Join Date
    Aug 2011
    Rep Power

    Default JavaFX GUI contents not showing up

    I have a javaFX GUI that is being called and it doesn't show the contents, such as the progress bar or the text, but the window shows up fine.

    This is the call to the GUI method---
    Java FX Code:
            ErrorBox box = new ErrorBox();
            box.windowBoxWithProgressBar("Gathering Resources", -1.0);
            jsonString = Reader.openSite(URL);
    What is interesting is if I comment out
    Java FX Code:
           jsonString = Reader.openSite(URL);
    It works just fine. My assumption is it is because I am opening an inputstream in that method but I dont know how to remedy it.

    This is part of the code that opens the inputstream, it is called immediately after the method is invoked---
    Java FX Code:
    BufferedInputStream in = null;
            in = new BufferedInputStream(
                    new URL(pAddress).openStream());
            catch(MalformedURLException ex) 
                System.out.println("Caught malformed URL in class Reader");
            catch(IOException bad) 
                System.out.println("Caught IO Exception in class Reader");
            //converting the input stream into a stream reader then a buffered one
            InputStreamReader reader = new InputStreamReader(in);
            BufferedReader bufferedReader = new BufferedReader(reader);

    This is the actual GUI method---
    Java FX Code:
    public void windowBoxWithProgressBar(String pMessage, Double init)
            mBar = new ProgressBar(init);
            BorderPane pane = new BorderPane();
            mLabel = new Label(pMessage);
            Scene scene;
            scene = new Scene(new Group(pane));
            Stage progStage = new Stage();
    Any help would be appreciated. I have been trying to figure this out for a while now. Thanks.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: JavaFX GUI contents not showing up

    Quote Originally Posted by slider57 View Post
    I have a javaFX GUI
    Moved from New to Java

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. JavaFX Book | Learn JavaFX More In Depth
    By SnakeDoc in forum JavaFX
    Replies: 0
    Last Post: 05-17-2013, 11:10 PM
  2. Help with javaFX?!
    By JavaNoob!1 in forum JavaFX
    Replies: 7
    Last Post: 07-18-2012, 10:56 PM
  3. Replies: 1
    Last Post: 02-23-2010, 09:48 AM
  4. JavaFX Script and JavaFX Mobile
    By levent in forum Java Software
    Replies: 1
    Last Post: 01-27-2010, 04:48 PM
  5. Replies: 1
    Last Post: 02-20-2009, 03:49 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts