Results 1 to 3 of 3
  1. #1
    Snake006 is offline Senior Member
    Join Date
    Jun 2013
    Posts
    129
    Rep Power
    0

    Default How to put a console on JFrame or graphics program window?

    Hello, I was wondering how to put a console on a JFrame or on graphics window. I thought about simply using a JtextField however I don't have access to the readline command since it appears to me that it is only found in a Console Program. So basically I was wondering how to put up a console on JFrame so I can issue commands on it and watch graphical stuff happen on the same screen(minus where the console box is of course). If it is any easier to just make it so a Jtextbox can read text, any thoughts are how to do that would be great as well.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,143
    Rep Power
    15

    Default Re: How to put a console on JFrame or graphics program window?

    Use a JTextField to allow the user to enter commands.
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  3. #3
    Ronin is offline Senior Member
    Join Date
    Oct 2010
    Posts
    393
    Rep Power
    10

    Default Re: How to put a console on JFrame or graphics program window?

    Hi Snake,

    You need to use the getText() method of the JTextField.

    Regards.

Similar Threads

  1. Centering graphics on the graphics window
    By janyc71876 in forum New To Java
    Replies: 5
    Last Post: 11-25-2013, 08:25 PM
  2. Replies: 10
    Last Post: 09-17-2011, 12:59 PM
  3. How to display the console window?
    By yma16 in forum IntelliJ IDEA
    Replies: 0
    Last Post: 05-19-2011, 08:32 AM
  4. Using Scanner console for Graphics
    By bensewards in forum New To Java
    Replies: 3
    Last Post: 03-17-2010, 03:16 AM
  5. Calling a JFrame window from a command line program.
    By new_2_java in forum New To Java
    Replies: 7
    Last Post: 11-09-2008, 04:40 AM

Posting Permissions

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