Jump to content

user input

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
Ananta2010

Ananta2010

    Newbie

  • Members
  • Pip
  • 9 posts
how do i make a program wait for user input...i.e ..it executes only when user gives an input????is there anything like a "scanf" command as in 'C'..pls help...

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
There are several ways, including system.in and Scanner
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
smithi

smithi

    Newbie

  • Members
  • Pip
  • 9 posts
You could use a dialog window.

Take a look here:
How to Make Dialogs (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)

#4
Ananta2010

Ananta2010

    Newbie

  • Members
  • Pip
  • 9 posts
could you please write an example of a code using scanner...

#5
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Do a search on this site. There are lots of examples.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog