How to manipulate JtextArea
Hi,
I use the type JtextArea and I do not know too how to manipulate it.J've created 2 JtexArea one of them contains values and the other is empty.When I clic on a button,the selected item will be moved to the empty JtextArea.
j've developed this code but it does not automatically selects the items(it can be done only manually).And when i want to move an item,it travels but a copy remains in the first JtextArea while i want to move it squarely from the first JtxtArea.Here is my code:
Code:
private void jButton1_actionPerformed(ActionEvent e) {
String sel=jTextArea1.getSelectedText();
if (sel!="")
{
jTextArea2.append(sel+"\n");
jTextArea1.removeAll();
}
else if(sel=="")
;
}