Prompt « JTextArea « Java Swing Q&A





1. command prompt output to text area    coderanch.com

3. Want to display prompt when press enter in JTextArea.    forums.oracle.com

String command=""; String prompt1="Router>"; String prompt2="Router#"; String prompt3="Router(Config)#"; String prompt4="RiP"; JScrollPane jScrollPane1 = new JScrollPane(); JTextArea jTextArea1 = new JTextArea(); BorderLayout border1=new BorderLayout(); public test() { try { jbInit(); jTextArea1.append("Bridging Software.\nVirtual Router Simulator,Version 1.0."); jTextArea1.append("\nConsole Configuration of (Router1)\n\n"); jTextArea1.append("1:)Ethernet/IEEE 802.3 Interfac(s).\n"); jTextArea1.append("2:)Serial Network Interface(s)\n"); jTextArea1.append("32KiloByte of Non-Volatilen Configuration Memory\n"); jTextArea1.append("16384K bytes of processor board System flash (Read ONLY)\n\n\n\n\n\n\n\n"); jTextArea1.append("\nRouter con0 is ...