Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

user input

user input

  • Please log in to reply
4 replies to this topic

#1 Ananta2010

Ananta2010

    CC Lurker

  • Just Joined
  • Pip
  • 9 posts

Posted 16 June 2010 - 04:25 AM

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...
  • 0

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 16 June 2010 - 04:28 AM

There are several ways, including system.in and Scanner
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 smithi

smithi

    CC Lurker

  • Just Joined
  • Pip
  • 9 posts

Posted 16 June 2010 - 04:29 AM

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)
  • 0

#4 Ananta2010

Ananta2010

    CC Lurker

  • Just Joined
  • Pip
  • 9 posts

Posted 16 June 2010 - 06:13 AM

could you please write an example of a code using scanner...
  • 0

#5 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 16 June 2010 - 07:03 AM

Do a search on this site. There are lots of examples.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/






Also tagged with one or more of these keywords: user input

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download