Results 1 to 5 of 5
- 07-05-2010, 05: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, 01: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, 06: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, 11:39 AM #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, 06:52 AM #5
- By xclaim in forum New To JavaReplies: 1Last Post: 01-14-2010, 03:46 AM
- By kelvinsmj in forum New To JavaReplies: 8Last Post: 11-27-2009, 10:30 AM
- By indikasampath2000 in forum AWT / SwingReplies: 4Last Post: 12-16-2008, 06:51 AM
- By sachin.parnami in forum New To JavaReplies: 2Last Post: 12-03-2008, 01:24 PM
- By kureikougaiji in forum New To JavaReplies: 6Last Post: 06-27-2008, 03:01 PM