Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DefaultStyledDocument??  RSS feed

Jimmy Nilsson
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have desided to use DefaultStyledDocument to print my reports. i have mange to print insert text, but i have notice that if the text is not fitting the JTextPane, then it will continue on the next row?

How do i get this thing to dissepear? i need it to print the text as i state, and not switch rows.

I also need to draw lines and so on in this DefaultStyledDocument, but i have not found a way to do this? there is no function like Graphics getGraphics(), do i have to print the symbold(diagrams) in a overidden paint method?

Is there a way to position text and other stuff as i want? like i could if i override a paint method and use Graphics.drawstring ans so on?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!