i m getting some problem using JTextPane when i set the left indent property using StyleConstants.setLeftIndent() function ( in initStylesForTextPane() fuction this is my function not java pl pay attention here as i printed the LeftIndent which is just what i set above but it is not indenting..? ) it is not doing indention but performing all othe task i included the code below ================ code: ================
Well I see a couple of problems. The first one is that your Style is local to the initStylesForTextPane() method. Once that is done - poof - the style is gone. Make it an instance variable and it will last a bit longer. Next, you define Style s and set some attributes for it, and then in the next breath you clobber those attributes with DIFFERENT attributes. Why?? Also, your question is VERY difficult to read. Please use proper punctuation. Most languages support periods.
"JavaRanch, where the deer and the Certified play" - David O'Meara