Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Columnheads of JTable become 'blue' (like they are selected)



On Aug 16, 2006, at 3:29 AM, Michiel Martens wrote:

Hi,

I've made a program with a JTable. The program imports some data from internet in the JTable. The columnheaders are not blue, until the import. After the import the headers are blue with a little triangle next to the headerword. How does that come?

The program can also import from an offline file and with that import the headers don't turn blue. (Don't know if that has something to do with it.)

Michiel Martens

Sounds like you are hitting a bug in the Aqua table header renderer. You will likely find that bringing up a JFileChooser sorted by date (the second column), will cause other JTables in your app to render as "selected", with offset text. This is an unfortunate side effect of the JFileChooserUI not using a separate instance of the apple.awt.AquaListHeaderBorder.


Please try Java SE 6 Developer Preview 5 at http://connect.apple.com, and see if this issue reproduces for you.

As a workaround for J2SE 5.0 or J2SE 1.4, you can replaced the TableCellRenderer for the column with a subclass of DefaultTableCellRenderer that has the border set to a new instance of AquaListHeaderBorder. You don't have to create a new instance for each column or table, it just has to be a different instance than the default one that is used by the JFileChooserUI.

Hope this helps,
Mike Swingler
Java Frameworks Engineer
Apple Computer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Columnheads of JTable become 'blue' (like they are selected) (From: Michiel Martens <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.