Use line wrap in JTextArea that wraps the line to a specific position in JTextArea
问题 I have a JTextArea that picks up text from another JTextArea and displays that text as seen in this image: I want the JTextArea to wrap the line from where rahul is written as in previous image. And below is the code from my smaller JTextArea from which the text is shown in the larger JTextArea . SimpleDateFormat sdf=new SimpleDateFormat("HH:mm"); String str=MainFrame.un+" ("+sdf.format(new Date())+") :"+txtSend.getText(); DataServices.send(runm+":"+str); // for sending this to its socket