• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

Thanx.

Regards,
-- Neha.

[ December 27, 2004: Message edited by: Neha D ]
[ December 27, 2004: Message edited by: Neha D ]
 
So it takes a day for light to pass through this glass? So this was yesterday's tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic