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){ 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









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
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
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
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...;Break");   LineBreakExample controller = new 
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 (adsbygoogle = window.adsbygoogle || []).push
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
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
PHP line break, PHP nl2br() function
The PHP Line break example & code If you are developing the application... the same value on the website. If user enters the <enter key> to add the line... the nl2br() function to add the line break in the text. The nl2br() function adds
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
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
Retriving data from MYSQL without line break using java
Retriving data from MYSQL without line break using java  get data without line breaking from mysql table (i.e data stored as mediumtext )using java
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
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
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
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
how to move curosr from one text field to another automatically when the first textfield reaches its maximum length
how to move curosr from one text field to another automatically when the first textfield reaches its maximum length  how to move curosr from one text field to another automatically when the first textfield reaches its maximum
how to print hello world every second till i have pressed enter key
how to print hello world every second till i have pressed enter key  how to print hello world every second till i have pressed enter key
I want to put user guide in pdf and word in side WEB-INF and need to give link on the home page
I want to put user guide in pdf and word in side WEB-INF and need to give link on the home page  I want to put user guide in pdf and word formats in side WEB-INF (for security reasons, I want these documents visible after user
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
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
get UnsatisfiedLinkError when I try to use my JDBC driver.
get UnsatisfiedLinkError when I try to use my JDBC driver.  Why do I get UnsatisfiedLinkError when I try to use my JDBC driver
how can i make a session invalidate in java when browser is closed
how can i make a session invalidate in java when browser is closed   how can i make a session invalidate in java when browser is closed   ...). So I wanted to make the session invalid when browser/tab is closed like gmail
PHP Break
Break Control Structure: Break is a special kind of control structure which helps us to break any loop or sequence, like if we want to break the flow of any loop (for, while etc) then we can use break statement, generally we need
I invoke the ResultSet methods afterLast and beforeFirst when the method next works.
I invoke the ResultSet methods afterLast and beforeFirst when the method next works.  Why can't I invoke the ResultSet methods afterLast and beforeFirst when the method next works
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
Null value when i set interface object in form controller - Spring
Null value when i set interface object in form controller   Hi all, i am very new about spring and hibernate. i got null value when i set.... when i call this method in form controller ohbillManager.saveBill(ohbill); i
break and continue
break and continue   hi i am jane pls explain the difference between break and continue
write data to a pdf file when i run jsp page
write data to a pdf file when i run jsp page  Hi, <%@page import... to the libraries.the pdf file are not opened when i execute the program.please send the code to open the pdf file when i execute the jsp page
write data to a pdf file when i run jsp page
write data to a pdf file when i run jsp page  Hi, <%@page import... to the libraries.the pdf file are not opened when i execute the program.please send the code to open the pdf file when i execute the jsp page
write data to a pdf file when i run jsp page
write data to a pdf file when i run jsp page  Hi, <%@page import... to the libraries.the pdf file are not opened when i execute the program.please send the code to open the pdf file when i execute the jsp page
write data to a pdf file when i run jsp page
write data to a pdf file when i run jsp page  Hi, <%@page import... to the libraries.the pdf file are not opened when i execute the program.please send the code to open the pdf file when i execute the jsp page
Java I/O From the Command Line
Java I/O From the Command Line In this section we will learn about the I/O from the command line in Java. Several times you can see that the programs runs after taking the input from the command line. Java also supports for the command
How to load elements from db when i press next.
How to load elements from db when i press next.  Hello , I am working on a project "Online Book Mart" using JSP and Servlets and I am astuck... means when i click next, the next 20 books will be displayed from db on the same
how i get experience wise resume from database when i submit from browser
how i get experience wise resume from database when i submit from browser  how i get experience wise resume from database when i submit from browser   Please go through the following link: Visit Here
No module named 'absl' error when I import tensorflow
No module named 'absl' error when I import tensorflow  Hi, In one... the errror: No module named 'absl' error when I import tensorflow Earlier... to resolve the error: No module named 'absl' error when I import tensorflow
No module named 'absl' error when I import tensorflow
No module named 'absl' error when I import tensorflow  Hi, In one... the errror: No module named 'absl' error when I import tensorflow Earlier... to resolve the error: No module named 'absl' error when I import tensorflow
No module named 'absl' error when I import tensorflow
No module named 'absl' error when I import tensorflow  Hi, In one... the errror: No module named 'absl' error when I import tensorflow Earlier... to resolve the error: No module named 'absl' error when I import tensorflow
No module named 'absl' error when I import tensorflow
No module named 'absl' error when I import tensorflow  Hi, In one... the errror: No module named 'absl' error when I import tensorflow Earlier... to resolve the error: No module named 'absl' error when I import tensorflow

Ads