Itry to move text in tTextarea to left or to center or to right by pressing to buttons
i did like this but unfortuantly it is not work .
public void actionPerformed(ActionEvent e) {
if(e.getSource()==buttons[0]){
area.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
}
if(e.getSource()==buttons[2]){
area.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
}
}
area if an object from JTextArea
can any one help me ??
thanks in advance
Beshoy atef