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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -