automatically break line when ever I put enter.

Ads
 

automatically break line when ever I put enter.

code is working fine. but in output Enter is ignored.

public void action(int a){ if(a == 0){ OriginalMsg = jTextArea1.getText().toString(); EncryptedMsg = jTextArea2.getText().toString(); StringBuffer sb = new StringBuffer(OriginalMsg); for(int i = 0; i < sb.length(); i++){ int temp = 0; temp = (int)sb.charAt(i); temp = temp * 11; sb.setCharAt(i, (char)temp); EncryptedMsg = sb.toString(); } jTextArea2.setText(EncryptedMsg); } else if(a == 1){ jTextArea1.setText(""); jTextArea2.setText("");

} }

text area of text message contain one single line. it should break lines like what I am typing above.

View Answers

Ads









Related Tutorials/Questions & Answers:
automatically break line when ever I put enter.
automatically break line when ever I put enter.  code is working fine. but in output Enter is ignored. public void action(int a){ if(a == 0... break lines like what I am typing above
when i hit enter it represent action like click a button
when i hit enter it represent action like click a button  Hi, Plz provide a program in html like I want 2 submit buttons,when i hit the enter button it will represent the action like click the 1st submit
Advertisements
how to create directed line between two buttons when i clicked there
how to create directed line between two buttons when i clicked there  Hi I have to create a topology between 6 nodes. 6 nodes are created as 6 buttons and when i clicked in first button and then on second button a directed
automatically resend when connection lost in sending email
automatically resend when connection lost in sending email  send automatically email when connection lost in sending bulk email using javamail for exp more than 10000 emails
automatically resend when connection lost in sending email
automatically resend when connection lost in sending email  send automatically email when connection lost in sending bulk email using javamail for exp more than 10000 emails
automatically resend when connection lost in sending email
automatically resend when connection lost in sending email  send automatically email when connection lost in sending bulk email using javamail for exp more than 10000 emails
HTML line break tag
HTML line break tag. The HTML Line break tag <br> is used to add a line break in web page. You can use the <br> tag to add line break in your.... While displaying the web page browser will add a line break where it finds
How can java programs execute automatically when it connects to network
How can java programs execute automatically when it connects to network  Good Day dears... How can java programs execute automatically when it connects to network. Thanks in Advance friends Shackir   How can i Test
automatically move next page when data fetched from database is stored in text field
automatically move next page when data fetched from database is stored in text... stored when data in second text is tried to enter or automaticaaly fetched... on enter button in first page . is i possible in javascript or ajax
i want print the following out put
i want print the following out put  Hello sir i want the following out put can u provide the program in c# o/p; HELLOLLEH HELLLEH HELEH HEH H
Break a Line for text layout
Break a Line for text layout   ... to break a line. To break down the text into lines, the class LineBreakMeasurer...;= new JFrame("Show Line Break");   
Can I put coursera on my resume?
Can I put coursera on my resume?  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: Can I... so that I can learn the topic "Can I put coursera on my resume?"
Can I put online courses on my CV?
Can I put online courses on my CV?  Hi, I am beginner in Data... I put online courses on my CV? Try to provide me good examples or tutorials links so that I can learn the topic "Can I put online courses on my CV?"
Should I put DataCamp on my resume?
Should I put DataCamp on my resume?  Hi, I am beginner in Data...: Should I put DataCamp on my resume? Try to provide me good examples or tutorials links so that I can learn the topic "Should I put DataCamp on my resume
When should I learn tensorflow
When should I learn tensorflow  Hi, TensorFlow is now getting used in industry. I am planning to learn it. When should I learn tensorflow? Thanks   Hi, Its always better to learn new technologies asap. Science
When should I learn tensorflow
When should I learn tensorflow  Hi, TensorFlow is now getting used in industry. I am planning to learn it. When should I learn tensorflow? Thanks   Hi, Its always better to learn new technologies asap. Science
When i click on Monitor Tomcat, it shows
When i click on Monitor Tomcat, it shows   To run servlet i have seen... installed java 7 and tomcat 7, when i click on Monitor Tomcat it shows...' and when i Open your Browser (Google Chrome) and type the following URL : http
When i click on Monitor Tomcat, it shows
When i click on Monitor Tomcat, it shows   To run servlet i have seen... installed java 7 and tomcat 7, when i click on Monitor Tomcat it shows...' and when i Open your Browser (Google Chrome) and type the following URL : http
Guys Help me with this Application(when you put the name of the website it will return the IP of the web)
Guys Help me with this Application(when you put the name of the website...); InetAddress SW[]=InetAddress.getAllByName("www.google.com"); for(int i=0;i<SW.length;i++) System.out.println(SW[i
Guys Help me with this Application(when you put the name of the website it will return the IP of the web)
Guys Help me with this Application(when you put the name of the website...); InetAddress SW[]=InetAddress.getAllByName("www.google.com"); for(int i=0;i<SW.length;i++) System.out.println(SW[i
Jsp error when i run this a jsp file
Jsp error when i run this a jsp file  hi I got this error when i run the jsp file in IDE and outside also please help me java.lang.NullPointerException org.apache.jsp.insertjsp.jspInit(insert_jsp.java:22
Page is not getting loaded when I refresh the webpage???
Page is not getting loaded when I refresh the webpage???  **I am... when I refresh the page.* Note: Header section is getting loaded always Could... function in JSP. It will get all details of image section from database. *I am
When should I start learning machine learning?
When should I start learning machine learning?  Hi, I am beginner... to learn: When should I start learning machine learning? Try to provide me good examples or tutorials links so that I can learn the topic "When should I
how to check the radio button automatically depending up on the value of database when editing the form...
how to check the radio button automatically depending up on the value of database when editing the form...  hi...in my application i am editing... button. When the user clicks the particular radio button, that data will get shown
plsz i want the coding details of line
output.setRGB(j,i,-16777216); getRGB(j,i)<-8388608 why can put this value? its...plsz i want the coding details of line  package vc.api; import...(BufferedImage picture) { int i,j,min=128,max=128,value=0,col; for (i=0
plsz i want the coding details of line
plsz i want the coding details of line  package vc.api; import...(BufferedImage picture) { int i,j,min=128,max=128,value=0,col; for (i=0;i<picture.getHeight();i++){ for (j=0;j<picture.getWidth();j
I have a tex box. in that i want user should enter data in the format specified(for eg--a_b_c_d_e_)how to write code for it.
I have a tex box. in that i want user should enter data in the format specified(for eg--a_b_c_d_e_)how to write code for it.  I have a tex box. in that i want user should enter data in the format specified(for eg--abcde_)how
how can i draw line between two panel contaning circle and line between their center?
how can i draw line between two panel contaning circle and line between their center?   how can i draw line between two panel contaning circle and line between their center
How can i display the distance of a line drawing randomly?
How can i display the distance of a line drawing randomly?  How can i display the distance of a line drawing randomly
when I run exiting project that time I got error, I want solution on it?
when I run exiting project that time I got error, I want solution on it?  Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start
How do I install a .deb file via the command line?
How do I install a .deb file via the command line?  How do I install a .deb file via the command line?   Hi, You can install it with following command: sudo dpkg -i DEB_PACKAGE Example: sudo dpkg -i packagename.deb

Ads