Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Not displaying

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Not displaying

    Hello!

    I have made a small code using tutorials and have compiled it to .jar, but once I launch it, nothing displays, but in console it does. I created a loop which just generates numbers (10000) to test again, still it didn't display, but I saw that it's generating by watching my mouse's cursor.

    Here's my code.

    import java.util.Scanner;
     
    public class kalku
    {
    	public static void main(String args[]) 
    	{
    		Scanner kalkulators = new Scanner(System.in);
    		double fnum, snum, answer;
    		System.out.println("Insert first number: ");
    		fnum = kalkulators.nextDouble();
    		System.out.println("Insert second number: ");
    		snum = kalkulators.nextDouble();
    		answer = fnum + snum;
    		System.out.println(answer);
    	}
    }

    Oh! I managed to launch it trough Command Prompt using "java -jar filename.jar"! Seems case is closed, now I need to figure out how to create some GUI or something like that.
    Last edited by toksiks; July 20th, 2011 at 04:18 AM.


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Not displaying

    Hello toksiks, welcome to the forums. Is this thread solved?
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. Everything but JLabel is displaying
    By Jacksontbh in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 3rd, 2011, 10:30 PM
  2. Displaying an Image Problem
    By petur170 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: June 23rd, 2011, 08:23 AM
  3. Problem on displaying Celcius
    By Superteo1987 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 31st, 2011, 10:23 AM
  4. Not Displaying what I need
    By rob3097 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 7th, 2010, 10:31 PM
  5. Displaying things in gui
    By KrisTheSavage in forum AWT / Java Swing
    Replies: 2
    Last Post: March 29th, 2010, 12:21 PM