alignment - Java Text align not working -
i want text enter in textarea @ right. enter code (chatarea.append(loginname + ": " + message + "\n");
) , when execute program, text @ left. thats stupid question i'm new @ java.
here code:
dbhandler.savenewmessage(message, loginname); messageinsert.settext(""); chatarea.append(loginname + ": " + message + "\n"); chatarea.setalignment(chatarea.right);
change code below:
dbhandler.savenewmessage(message, loginname); messageinsert.settext(""); chatarea.append(loginname + ": " + message + "\n"); chatarea.setrtl(true); chatarea.setalignment(textarea.left);
in above code, activating rtl textarea, hence directions of text rendering reversed therefore left considered right i.e. mirror. effect can considered mirroring effect.
Comments
Post a Comment