Results 1 to 2 of 2
  1. #1
    theunlockeRRR is offline Code Child
    Join Date
    Aug 2016
    Location
    Serbia
    Posts
    45
    Rep Power
    0

    Default Easiest way to get user typing

    I want to make an app, and I need to somehow get user input, but I don't mean like input from console with scanner, instead I want to get keys that the user pressed, store it and display it(but using drawString with graphics)
    Is it possible that it can be done using some java class/api or do I need to implement keylistener and make a boolean for every letter? If you didn't understand so good, ask me to explain more.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Easiest way to get user typing

    want to get keys that the user pressed,
    Look at the KeyListener and KeyAdapter interfaces. Also read the tutorial: How to Write a Key Listener (The Java™ Tutorials > Creating a GUI With JFC/Swing > Writing Event Listeners)
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 5
    Last Post: 07-31-2013, 05:05 PM
  2. Easiest way to write this program,please help !
    By Katniss in forum New To Java
    Replies: 2
    Last Post: 10-15-2012, 11:46 PM
  3. Easiest/Best way to achieve this
    By Nanomech in forum New To Java
    Replies: 2
    Last Post: 12-19-2011, 05:50 AM
  4. easiest ide to install
    By ishango in forum New To Java
    Replies: 5
    Last Post: 03-16-2011, 12:50 PM
  5. Replies: 1
    Last Post: 08-13-2009, 08:10 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
  •