JDK-4339584 : Adding a getUI public method to JComponent
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_2
  • CPU: unknown
  • Submitted: 2000-05-19
  • Updated: 2020-02-14
  • Resolved: 2015-08-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b82Fixed
Related Reports
Relates :  
Description
Today, there is no way for a program to access the UI of a JComponent. Adding a getUI method would provide that capability and be consistent with the fact that, for example, the JComponent's Border is accessible.

Comments
In jdk5 the possibility to use covariant returns types was added, so now we can add the "ComponentUI getUI()" method to the JComponent and in the same time we will have an ability to override it using more specific return value in subclasses.
13-08-2015

EVALUATION JComponent does not have a getUI so that each class can override it to return the UI that is appropriate for the class, such as TreeUI or TextUI... scott.violet@eng 2000-12-14
14-12-2000