2010-01-07 3 views
1

문제가 발생했습니다. JEditorPane은 HTML 테이블을 존중하지 않습니다. style="height: 100%;" 아이디어가 있습니까?JEditorPane가 html 테이블의 높이를 존중하지 않는다 100 %

JEditorPane jEditorPane = new JEditorPane(); 
JScrollPane scrollPane = new JScrollPane(jEditorPane); 
jEditorPane.setPage(url); 
JFrame frame = new JFrame(); 
frame.getContentPane().add(scrollPane, BorderLayout.CENTER); 
frame.setSize(800, 600); 
frame.setVisible(true); 


<html style="height: 100%;"> 
    <body style="height: 100%;"> 
    </head><body> 
    <table style="height: 100%;width: 100%" border="1"> 
     <tr><td>1</td><td>12</td></tr> 
     <tr><td>2</td><td>22</td></tr> 
    </table> 
    </body> 
</html> 

감사

답변

1

JEditorPane의 HTML 지원이 version 3.2위한 많은. HTML 3.2 tables에는 style 특성이 없습니다.

+0

해결 방법이 있습니까? – Jonas

+0

아마도 Swing XHTML 렌더러의 Flying Saucer 프로젝트를 살펴보십시오. – Mark

관련 문제