Register / Login
Win a copy of
Android Programming: The Big Nerd Ranch Guide
this week in the
this forum made possible by our volunteer staff, including ...
Roel De Nijs
Stephan van Hulst
Swing / AWT / SWT
HTML table inside jLabel not aligning and resizing
posted 3 years ago
I have to create a table with multiple text in each row. Hence i thought of using Jlabel that renders a html table since i want one column and multiple text in each row.
I have put the jlabels inside the jpanel using table cell renderer.
Here's what i have tried.
label.setText('<html><table border='0' ><tr><td ><b>" bb + "</b></td><td>" + aa + "</td></tr><tr><td >xx: " + xx+ "</td> <td>yy Phy: " + yy + "</table></html>');
It seems to be working fine with the preferred size. But when the Jpanel is shrinked the columns are not aligned and the space between the columns are non uniform in each row.
am using netbeans IDE.
Thank you so much for the help in advance !
Boost this thread!
How to reduce cell heigt in a Table
Update user profile
how to fetch the value of the checkbox in jsp?
How to validate that in each row how many checkboxes are checked