Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I make command line interface (CLI)

 
Vikas Kumar Sahu
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
How can I make command line interface ( CLI ) In Java using JTextArea or JTextField.
Thanks In advance..
Vikas Sahu
 
Eddie Vanda
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vikas,
Someone may already have done this work, but I just played with a JTextArea and a document listener just to see what that's all about.

I found it interesting to highlight a bit of code and then paste a letter to replace that highlighted area. You could combine that with ta.getText() to see what cli input was made when the last character is a cr.
Ed
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic