Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in displaying JTable multiline headers with icons in jdk1.2  RSS feed

Neha D
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

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.


-- Neha.

[ December 27, 2004: Message edited by: Neha D ]
[ December 27, 2004: Message edited by: Neha D ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!