java - How to split in JtextArea -
Hi, I'm trying to design a GUI to send emails
I can send an email to Comandprompt but when I try to do it with a GUI, I can not divide my email
It is that if I write xyz@gmail.com Yes, ABC @ gmail.omo My email is not sent
I used Java split in the command prompt code and it worked but it does not work in GUI
Can anyone tell me How can I use commas to separate two entries in Java Testeria? / P>
if (! C.isEmpty ()) {string [] ccsplit = c.split (","); String [] ccsplit = c.split (","); For (int i = 0; i & lt; tosplit.length; i ++) {sendToServer ("RCPT TO:" + ccsplit [i]); ReceiveFromServer ();}
This code worked for comand promt..but now it does not work for JTextArea
Your code should look like this:
JTextArea textArea = new JTextArea (); String c = textArea.getText (); If (! C.isEmpty ()) {System.out.println (c); // Check the value of C string [] ccsplit = c.split (","); For (int i = 0; i & lt; ccsplit .length; i ++) {sendToServer ("for RCPT:" + ccsplit [i]); ReceiveFromServer (); }}
If maybe not working then you have another "wrong" in your code.
Comments
Post a Comment