Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

paint JTextPane in java.awt.Rectangle

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�?
    Bookmark Topic Watch Topic
  • New Topic