Problem in displaying JTable multiline headers with icons in jdk1.2
posted 11 years ago
I am trying to display icons for JTable headers which are single line & multiline headers. When a header is clicked the icon is added to a vector. Then the header text is checked for single line & multiline text & then even this text is added to the same vector. Then by using the setListData(vector) & by using a ListCellRenderer for a JLabel this is being changed to a JLabel & is then displayed.
But the problem is that for single line headers the icon & the text string appear in the same line & therefore the whole text is not visible.
The second problem is that for multiline headers the icon in the vector is being replaced by the header text & it only displays the normal multiline header without the icon.
Well the same code works perfectly fine with jdk1.4 & now I want the same thing for jdk1.2. For jdk1.4 the icon appears below the text string by default.
Can anyone please tell me where the problem is. Has the ListCellRenderer changed for these 2 jdk versions??
Please suggest me how do I proceed with this problem.
Any help will be highly appreciated.
Regards, -- Neha.
[ December 27, 2004: Message edited by: Neha D ] [ December 27, 2004: Message edited by: Neha D ]