Results 1 to 2 of 2
  1. #1
    nullandvoid is offline Member
    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    Default Don't want entire program to display at once. Help?

    I'm working on a program that just tests various string methods (beginner stuff). I would like for the program to not display everything at all once when it runs. I don't know how to do this, and I'm not sure what to search for to learn how to do it. It doesn't need to have any user input, menu options etc, it just needs to display a bunch of things, but when it all shows up on the screen at once is seems cluttered and overwhelming.

    Can someone tell me what I should be looking for?

    I'm sure what I'm trying to do is called something, I just don't know what it's called

  2. #2
    Join Date
    Apr 2013
    Posts
    41
    Rep Power
    0

    Default Re: Don't want entire program to display at once. Help?

    use a boolean to dictate if you want to print something or not.
    for instance:
    Java Code:
    boolean p = false;
    if (p != false)
    ///print whatever
    if your talking about adding a delay to the printing then use this:
    Java Code:
    Thread.sleep(x);
    where x is the time in milliseconds so 1 second you would put 1000.

Similar Threads

  1. Why the program only display the first person name?
    By yyKHOR_1021@live.com in forum New To Java
    Replies: 2
    Last Post: 11-03-2012, 01:53 PM
  2. how to display input from one program to a gui
    By blackmonk@webmail.co.za in forum AWT / Swing
    Replies: 4
    Last Post: 11-25-2010, 01:02 PM
  3. Program doesn't display anything
    By Chasingxsuns in forum New To Java
    Replies: 14
    Last Post: 11-11-2009, 03:52 AM
  4. Display program
    By nhlfan in forum New To Java
    Replies: 2
    Last Post: 11-22-2007, 12:00 AM
  5. My program doesnt display anything
    By Bojevnik in forum AWT / Swing
    Replies: 2
    Last Post: 10-19-2007, 02:50 PM

Posting Permissions

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