• Post Reply Bookmark Topic Watch Topic
  • New Topic

using Tabset for a hanging indent

 
Ricky Gentry
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm looking for a way to set up a paragraph in a JTextPane to be a distance from the left side and also have a hanging indent.

i.e.

xxxxxxxxxxx
xxxxxxxx
xxxxxxxx

I'm currently trying to use a TabSet, but it doesn't seem to be working. Is this even possible?
 
Brian Cole
Author
Ranch Hand
Posts: 920
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ricky Gentry:
I'm looking for a way to set up a paragraph in a JTextPane to be a distance from the left side and also have a hanging indent.


StyleConstants has setFirstLineIndent() and setLeftIndent() methods.
 
Brian Cole
Author
Ranch Hand
Posts: 920
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Brian Cole:

StyleConstants has setFirstLineIndent() and setLeftIndent() methods.


I should have mentioned that FirstLineIndent may be negative.
 
Ricky Gentry
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!