RFR: 8259687: JTabbedPane.setComponentAt doesn't hide previously visible tab component [v2]

Harshitha Onkar honkar at openjdk.org
Sat Jul 30 00:28:13 UTC 2022


> A simple change listener is used in JTabbedPane to lazily fill with components - this is done by adding the components to JTabbedPane using the `setComponentAt` in the change listener.
> 
> Previously, if the change listener was placed before calling `addTab()` , the previous visible component was overlapping with the current visible component. To fix it, the visibility of previous component is set to false before the current component's visibility is set to true in `setComponentAt`.
> 
> Following are the before and after fix screenshots-
> 
> ![image](https://user-images.githubusercontent.com/95945681/181658303-ff3a7df7-5af6-4e76-a103-45d4d76480c3.png)

Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:

  bug id changed, added isVisible check

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/9681/files
  - new: https://git.openjdk.org/jdk/pull/9681/files/2a9cd459..ef823ee7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=9681&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9681&range=00-01

  Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/9681.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9681/head:pull/9681

PR: https://git.openjdk.org/jdk/pull/9681



More information about the client-libs-dev mailing list