Click to See Complete Forum and Search --> : jTextPane


Battle Programmer Rii
May 20th, 2010, 01:56 PM
Hi all,

I am new to the forum here and would like to say hi :-)

For setting the indentation of text in jTextPane, what would be the preferred method of doing this?

I would like to mimic the functionality in Word so you can set the indentation using a slider.

Any pointers or tips will be greatly appreciated.

Thanks :-)

dlorde
May 21st, 2010, 04:34 AM
I imagine the StyledEditorKit.AlignmentAction (http://java.sun.com/javase/6/docs/api/javax/swing/text/StyledEditorKit.AlignmentAction.html) is the class to use for this.

Progress is possible only if we train ourselves to think about programs without thinking of them as pieces of executable code...
E. Dijkstra