I’d like to build a standard JTable but with all rows spanned on one specific column. So that column has to contain only one cell with a JTextPane as its renderer.
Do you know any simply way to do that?
NB: no third part software required.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The rendering of a
JTable, including the clipping to the cell rectangle, is buries deep inside the user interface implementations of the pluggable look and feel in question. Changing stuff there is going to be messy business, and highly dependent on the actual JFC implementation.So instead I’d suggest drawing the cells of those roes any way you like, and having another transparent pane on top of the table to overlay those areas with the spanned content you describe. Still messy, probably quite a bit of work, but more likely to be portable.