Results 1 to 5 of 5
- 07-05-2010, 06:39 AM #1
how to make command prompt in java
need your help please, i want to make an application like command prompt (windows terminal) in java, but my project does't goes well because my JTextArea would't listen my command :) . can action listener implemented in jtextArea, or maybe other component in java could make this work...
i will appreciate any your help
- 07-05-2010, 02:52 PM #2i want to make an application like command prompt
When you enter a "command" in the text area and press Enter, you want a listener to read what was entered in the text area, do the "command" and display the results in the text area.
What listener are you using for the text area? Can you show your code?
- 07-11-2010, 07:09 AM #3
sorry for my late response...
i was trying search in google about action listener in jtextarea, but couldn't found what i want. about the command, i use the top down parsing method for the program.
- 07-11-2010, 12:39 PM #4
Have you looked at javacc? Its quite a powerful parser compiler.
As to your text area you need to make a document and override its insert method. This will tell you what character(s) are being entered - so you can detect the enter key.
- 07-14-2010, 07:52 AM #5
- By xclaim in forum New To JavaReplies: 1Last Post: 01-14-2010, 04:46 AM
- By kelvinsmj in forum New To JavaReplies: 8Last Post: 11-27-2009, 11:30 AM
- By indikasampath2000 in forum AWT / SwingReplies: 4Last Post: 12-16-2008, 07:51 AM
- By sachin.parnami in forum New To JavaReplies: 2Last Post: 12-03-2008, 02:24 PM
- By kureikougaiji in forum New To JavaReplies: 6Last Post: 06-27-2008, 04:01 PM