tags:

views:

38

answers:

1

Hi Stackoverflow,

i have got a problem, my JEditorPane do not respect HTML-Table style="height: 100%;" do you have an idea?

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>

thanks a lot

+1  A: 

JEditorPane's HTML support is for version 3.2. HTML 3.2 tables do not have a style attribute.

McDowell
is there a workaround?
Perhaps look at the Flying Saucer project for a Swing XHTML renderer
Mark