tags:

views:

41

answers:

2

I've a JEditPane "jep" to write in it like a document..

I want to add another JEditPane inside this 'jep'. is it possible to add? if so how? Please help me..

Below is an image showing the requirement. The whole image is JEditPane, on the leftside i need another box(yellow box in image) which i can write someting in it (like EditPane).. please give some hints.. thank you..

alt text

A: 

A JLayeredPane with the jep in the lowest (back-most) layer would allow you to float the other JEditorPane above it, by adding it to a higher layer. However, you would need to compute where the top pane is to be located and explicitly position it there yourself.

How to Use Layered Panes tutorial

Scott A Miller
A: 

Take a look at this http://java-sl.com/Pagination_In_JEditorPane_HF.html

Adding headers and footers in paginated content of JEditorPane. You can use the same approach calculating necessary position of your internal JEditorPane.

An alternative approache is to create a custom tag in HTMLEditorKit like described here http://java-sl.com/custom_tag_html_kit.html and use JEditorPane rather than button.

StanislavL