Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

paint JTextPane in java.awt.Rectangle

Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm developing a program that allows users to drag rectangles with diffrent z-index etc.
Now I'm building a WYSIWYG editor to let the users add information to the rectangles.

I want the users to see the text in the rectangles and planning to use a JTextPane for this with HTMLEditorKit, StyleSheet attached to the editor. How can I paint the JTextPane inside the java.awt.Rectangle. The rectangles are painted in a JPanel.

must I add all the JTextPanes to the JPanel? The Rectangles can be dragged so I hope I can add them to the Rectangle some how. Anyone who has an id�?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic