RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v3]
Alexey Ivanov
aivanov at openjdk.org
Fri Jun 30 10:41:08 UTC 2023
On Fri, 30 Jun 2023 07:46:22 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
> I tried with the `Integer` object and it works fine. Please suggest if anything else I can test.
Obviously, it does.
What about a custom object which doesn't override `toString`? Although this shouldn't be a problem either.
What if `JComboBox` uses a non-standard renderer which takes a property from an object? Let's assume, `JComboBox` is populated with `Rectangle` objects, a custom renderer is set which displays the value of the `bottom` field in the combo box. Your code, if I understand it correctly, will default to _full rectangle_ rather than what's really displayed.
How does `JTable` handle this kind of situation? Or `JList`? Swing relies on renderers which makes it capable of displaying an arbitrary object (it uses `toString` by default, if I'm not mistaken), a renderer could provide a custom view of an object in a cell, in a list.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1247721381
More information about the client-libs-dev
mailing list