开发者

JEditPane inside another JEditPane in swings(java)

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?开发者_StackOverflow社区 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..

JEditPane inside another JEditPane in swings(java)


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜