A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA/OCP Java SE 7 Programmer I & II Study Guide
this week in the
Swing / AWT / SWT
HTML table inside jLabel not aligning and resizing
Joined: Aug 13, 2013
Aug 13, 2013 14:03:22
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 !
I agree. Here's the link:
subject: HTML table inside jLabel not aligning and resizing
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
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014