Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8263472: Specification of JComponent::updateUI should document that t…
…he default implementation does nothing

Reviewed-by: aivanov, darcy
  • Loading branch information
prsadhuk committed Mar 26, 2021
1 parent e47dfb8 commit 4fbb7c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/java.desktop/share/classes/javax/swing/JComponent.java
Expand Up @@ -656,15 +656,18 @@ public JComponent() {


/**
* Resets the UI property to a value from the current look and feel.
* <code>JComponent</code> subclasses must override this method
* This method is called to update the UI property to a value from the
* current look and feel.
* {@code JComponent} subclasses must override this method
* like this:
* <pre>
* public void updateUI() {
* setUI((SliderUI)UIManager.getUI(this);
* }
* </pre>
*
* @implSpec The default implementation of this method does nothing.
*
* @see #setUI
* @see UIManager#getLookAndFeel
* @see UIManager#getUI
Expand Down

1 comment on commit 4fbb7c2

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.