I have to write a multi-line text inside the header cells of a JTable.
For this reason, I'm using HTML this way (this is an example):
JTable.getModel().getColumnModel().getColumn(i).setHeaderValue("
<html>
<div style='width:100%;height:300px;overflow:hidden'>
<div style='width:100%;height:150px;overflow:hidden'>
text of line 1
</div>
<div style='width:100%;height:150px;overflow:hidden'>
text of line 2
</div>
</div>
</html>
");
I want set the inner div a 100% width and 150px height. But seems that height, width and overflow doesn't work.
What is my error?
overflow:hidden.