RFR: 4337898: Serializing DefaultTableCellRenderer changes colors [v4]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Fri Dec 12 01:29:18 UTC 2025
On Thu, 11 Dec 2025 21:44:46 GMT, Phil Race <prr at openjdk.org> wrote:
> > > How/why does null restore the JTable-specified colors ? I don't see anything about null in the spec. And what have people been doing the last 25 years if serializing a JTable "broke" its rendering ?
> >
> >
> > Specifying null would cause `unselectedForeground` and `unselectedBackground` to be null
> > so it will fallback to table assigned foreground and background color
>
> So how do people know that ? Reading the source and trial and error don't count as ways to know.
Its implementation detail, not sure why people need to know upfront...
Are you thinking of user who will extend DefaultTableCellRenderer and provide its own implementation...
In that case, do you want me to add some spec wording to DefaultTableCellRenderer?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28549#issuecomment-3644507013
More information about the client-libs-dev
mailing list