JDK-8253358 : More Swing plaf APIs that rely on default constructors
  • Type: CSR
  • Component: client-libs
  • Sub-Component: javax.swing
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 16
  • Submitted: 2020-09-18
  • Updated: 2020-09-24
  • Resolved: 2020-09-24
Related Reports
CSR :  
Description
Summary
-------

Add explicit constructors to public & protected classes of javax.swing.plaf packages that have default constructors.

Problem
-------

Default constructors are not recommended for classes that are parts of a formal API.

Solution
--------

Add explicit public no-arg constructors for public classes and protected no-arg constructor for protected classes.

Specification
-------------

    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java
    index 949c3e35f4a..4bb0bf9e0d1 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java
    @@ -47,6 +47,11 @@
     
     public class BasicBorders {
     
    +    /**
    +     * Constructs a {@code BasicBorders}.
    +     */
    +    public BasicBorders() {}
    +
         /**
          * Returns a border instance for a {@code JButton}.
          *
    @@ -473,6 +478,11 @@ public Insets getBorderInsets(Component c, Insets insets)       {
          */
         @SuppressWarnings("serial") // Superclass is not serializable across versions
         public static class MarginBorder extends AbstractBorder implements UIResource {
    +        /**
    +         * Constructs a {@code MarginBorder}.
    +         */
    +        public MarginBorder() {}
    +
             public Insets getBorderInsets(Component c, Insets insets)       {
                 Insets margin = null;
                 //
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java
    index 9347298350d..4d73309869f 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java
    @@ -76,6 +76,11 @@
         // ********************************
         //          Create PLAF
         // ********************************
    +    /**
    +     * Constructs a {@code BasicButtonUI}.
    +     */
    +    public BasicButtonUI() {}
    +
         /**
          * Returns an instance of {@code BasicButtonUI}.
          *
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
    index aa816d431b0..ccf7d2f5d34 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
    @@ -39,6 +39,11 @@
      */
     public class BasicCheckBoxMenuItemUI extends BasicMenuItemUI {
     
    +    /**
    +     * Constructs a {@code BasicCheckBoxMenuItemUI}.
    +     */
    +    public BasicCheckBoxMenuItemUI() {}
    +
         /**
          * Constructs a new instance of {@code BasicCheckBoxMenuItemUI}.
          *
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java
    index 11b94fddab5..a1bd07282c1 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java
    @@ -60,6 +60,11 @@
         //            Create PLAF
         // ********************************
     
    +    /**
    +     * Constructs a {@code BasicCheckBoxUI}.
    +     */
    +    public BasicCheckBoxUI() {}
    +
         /**
          * Returns an instance of {@code BasicCheckBoxUI}.
          *
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java
    index 7ad582a0792..2259281dd8c 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java
    @@ -77,6 +77,11 @@
         protected PropertyChangeListener propertyChangeListener;
         private Handler handler;
     
    +    /**
    +     * Constructs a {@code BasicColorChooserUI}.
    +     */
    +    public BasicColorChooserUI() {}
    +
         /**
          * Returns a new instance of {@code BasicColorChooserUI}.
          *
    @@ -383,6 +388,11 @@ else if (prop == "componentOrientation") {
          * Instantiate it only within subclasses of {@code BasicColorChooserUI}.
          */
         public class PropertyHandler implements PropertyChangeListener {
    +        /**
    +         * Constructs a {@code PropertyHandler}.
    +         */
    +        public PropertyHandler() {}
    +
             public void propertyChange(PropertyChangeEvent e) {
                 getHandler().propertyChange(e);
             }
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java
    index 157c1dde4f7..0e5eab8285b 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java
    @@ -176,5 +176,9 @@ public void setBorder(Border b) {
         @SuppressWarnings("serial") // Same-version serialization only
         public static class UIResource extends BasicComboBoxEditor
         implements javax.swing.plaf.UIResource {
    +        /**
    +         * Constructs a {@code UIResource}.
    +         */
    +        public UIResource() {}
         }
     }
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java
    index 23899e72bc4..7b47386946c 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java
    @@ -145,5 +145,9 @@ public Component getListCellRendererComponent(JList<?> list,
          */
         @SuppressWarnings("serial") // Same-version serialization only
         public static class UIResource extends BasicComboBoxRenderer implements javax.swing.plaf.UIResource {
    +        /**
    +         * Constructs a {@code UIResource}.
    +         */
    +        public UIResource() {}
         }
     }
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
    index 4041f9793cb..ff3a1596fbd 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
    @@ -232,6 +232,11 @@
          */
         protected Insets padding;
     
    +    /**
    +     * Constructs a {@code BasicComboBoxUI}.
    +     */
    +    public BasicComboBoxUI() {}
    +
         // Used for calculating the default size.
         private static ListCellRenderer<Object> getDefaultListCellRenderer() {
             @SuppressWarnings("unchecked")
    @@ -592,6 +597,11 @@ private Handler getHandler() {
          * <code>BasicComboBoxUI</code>.
          */
         public class KeyHandler extends KeyAdapter {
    +        /**
    +         * Constructs a {@code KeyHandler}.
    +         */
    +        public KeyHandler() {}
    +
             @Override
             public void keyPressed( KeyEvent e ) {
                 getHandler().keyPressed(e);
    @@ -607,6 +617,11 @@ public void keyPressed( KeyEvent e ) {
          * <code>BasicComboBoxUI</code>.
          */
         public class FocusHandler implements FocusListener {
    +        /**
    +         * Constructs a {@code FocusHandler}.
    +         */
    +        public FocusHandler() {}
    +
             public void focusGained( FocusEvent e ) {
                 getHandler().focusGained(e);
             }
    @@ -627,6 +642,11 @@ public void focusLost( FocusEvent e ) {
          * @see #createListDataListener
          */
         public class ListDataHandler implements ListDataListener {
    +        /**
    +         * Constructs a {@code ListDataHandler}.
    +         */
    +        public ListDataHandler() {}
    +
             public void contentsChanged( ListDataEvent e ) {
                 getHandler().contentsChanged(e);
             }
    @@ -651,6 +671,11 @@ public void intervalRemoved( ListDataEvent e ) {
          * @see #createItemListener
          */
         public class ItemHandler implements ItemListener {
    +        /**
    +         * Constructs a {@code ItemHandler}.
    +         */
    +        public ItemHandler() {}
    +
             // This class used to implement behavior which is now redundant.
             public void itemStateChanged(ItemEvent e) {}
         }
    @@ -670,6 +695,11 @@ public void itemStateChanged(ItemEvent e) {}
          * @see #createPropertyChangeListener
          */
         public class PropertyChangeHandler implements PropertyChangeListener {
    +        /**
    +         * Constructs a {@code PropertyChangeHandler}.
    +         */
    +        public PropertyChangeHandler() {}
    +
             public void propertyChange(PropertyChangeEvent e) {
                 getHandler().propertyChange(e);
             }
    @@ -697,6 +727,11 @@ private void updateToolTipTextForChildren() {
          * <code>BasicComboBoxUI</code>.
          */
         public class ComboBoxLayoutManager implements LayoutManager {
    +        /**
    +         * Constructs a {@code ComboBoxLayoutManager}.
    +         */
    +        public ComboBoxLayoutManager() {}
    +
             public void addLayoutComponent(String name, Component comp) {}
     
             public void removeLayoutComponent(Component comp) {}
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
    index ef779a7642e..050f27e72b4 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
    @@ -733,6 +733,11 @@ public void actionPerformed(ActionEvent e){
          * @see BasicComboPopup#createMouseListener
          */
         protected class InvocationMouseHandler extends MouseAdapter {
    +        /**
    +         * Constructs an {@code InvocationMouseHandler}.
    +         */
    +        protected InvocationMouseHandler() {}
    +
             /**
              * Responds to mouse-pressed events on the combo box.
              *
    @@ -758,6 +763,11 @@ public void mouseReleased( MouseEvent e ) {
          * list if it is dragging over the list.
          */
         protected class InvocationMouseMotionHandler extends MouseMotionAdapter {
    +        /**
    +         * Constructs an {@code InvocationMouseMotionHandler}.
    +         */
    +        protected InvocationMouseMotionHandler() {}
    +
             public void mouseDragged( MouseEvent e ) {
                 getHandler().mouseDragged(e);
             }
    @@ -771,6 +781,10 @@ public void mouseDragged( MouseEvent e ) {
          * BasicComboBoxUI ActionMap/InputMap methods.
          */
         public class InvocationKeyHandler extends KeyAdapter {
    +        /**
    +         * Constructs an {@code InvocationKeyHandler}.
    +         */
    +        public InvocationKeyHandler() {}
             public void keyReleased( KeyEvent e ) {}
         }
     
    @@ -780,6 +794,10 @@ public void keyReleased( KeyEvent e ) {}
          * override.
          */
         protected class ListSelectionHandler implements ListSelectionListener {
    +        /**
    +         * Constructs a {@code ListSelectionHandler}.
    +         */
    +        protected ListSelectionHandler() {}
             public void valueChanged( ListSelectionEvent e ) {}
         }
     
    @@ -793,6 +811,10 @@ public void valueChanged( ListSelectionEvent e ) {}
          * @see #createItemListener
          */
         public class ListDataHandler implements ListDataListener {
    +        /**
    +         * Constructs a {@code ListDataHandler}.
    +         */
    +        public ListDataHandler() {}
             public void contentsChanged( ListDataEvent e ) {}
     
             public void intervalAdded( ListDataEvent e ) {
    @@ -806,6 +828,10 @@ public void intervalRemoved( ListDataEvent e ) {
          * This listener hides the popup when the mouse is released in the list.
          */
         protected class ListMouseHandler extends MouseAdapter {
    +        /**
    +         * Constructs a {@code ListMouseHandler}.
    +         */
    +        protected ListMouseHandler() {}
             public void mousePressed( MouseEvent e ) {
             }
             public void mouseReleased(MouseEvent anEvent) {
    @@ -818,6 +844,11 @@ public void mouseReleased(MouseEvent anEvent) {
          * The selection change is not committed to the model, this is for user feedback only.
          */
         protected class ListMouseMotionHandler extends MouseMotionAdapter {
    +        /**
    +         * Constructs a {@code ListMouseMotionHandler}.
    +         */
    +        protected ListMouseMotionHandler() {}
    +
             public void mouseMoved( MouseEvent anEvent ) {
                 getHandler().mouseMoved(anEvent);
             }
    @@ -828,6 +859,10 @@ public void mouseMoved( MouseEvent anEvent ) {
          * combo box.
          */
         protected class ItemHandler implements ItemListener {
    +        /**
    +         * Constructs an {@code ItemHandler}.
    +         */
    +        protected ItemHandler() {}
             public void itemStateChanged( ItemEvent e ) {
                 getHandler().itemStateChanged(e);
             }
    @@ -844,6 +879,10 @@ public void itemStateChanged( ItemEvent e ) {
          * @see #createPropertyChangeListener
          */
         protected class PropertyChangeHandler implements PropertyChangeListener {
    +        /**
    +         * Constructs a {@code PropertyChangeHandler}.
    +         */
    +        protected PropertyChangeHandler() {}
             public void propertyChange( PropertyChangeEvent e ) {
                 getHandler().propertyChange(e);
             }
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java
    index 262f36ee7d8..681ec227ccc 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java
    @@ -243,6 +243,11 @@ public void deiconize() {
             int __x, __y;
             Rectangle startingBounds;
     
    +        /**
    +         * Constructs a {@code MouseInputHandler}.
    +         */
    +        public MouseInputHandler() {}
    +
             public void mouseReleased(MouseEvent e) {
                 _x = 0;
                 _y = 0;
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java
    index e784d2d4b2a..894e2b07d1a 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java
    @@ -678,6 +678,10 @@ public boolean accept(Object sender) {
          */
         @SuppressWarnings("serial") // Superclass is not serializable across versions
         protected class OpenAction extends AbstractAction {
    +        /**
    +         * Constructs an {@code OpenAction}.
    +         */
    +        protected OpenAction() {}
             public void actionPerformed(ActionEvent evt) {
                 JDesktopPane dp = (JDesktopPane)evt.getSource();
                 SHARED_ACTION.setState(dp, Actions.RESTORE);
    @@ -693,6 +697,10 @@ public boolean isEnabled() {
          */
         @SuppressWarnings("serial") // Superclass is not serializable across versions
         protected class CloseAction extends AbstractAction {
    +        /**
    +         * Constructs a {@code CloseAction}.
    +         */
    +        protected CloseAction() {}
             public void actionPerformed(ActionEvent evt) {
                 JDesktopPane dp = (JDesktopPane)evt.getSource();
                 SHARED_ACTION.setState(dp, Actions.CLOSE);
    @@ -712,6 +720,10 @@ public boolean isEnabled() {
          */
         @SuppressWarnings("serial") // Superclass is not serializable across versions
         protected class MinimizeAction extends AbstractAction {
    +        /**
    +         * Constructs a {@code MinimizeAction}.
    +         */
    +        protected MinimizeAction() {}
             public void actionPerformed(ActionEvent evt) {
                 JDesktopPane dp = (JDesktopPane)evt.getSource();
                 SHARED_ACTION.setState(dp, Actions.MINIMIZE);
    @@ -731,6 +743,10 @@ public boolean isEnabled() {
          */
         @SuppressWarnings("serial") // Superclass is not serializable across versions
         protected class MaximizeAction extends AbstractAction {
    +        /**
    +         * Constructs a {@code MaximizeAction}.
    +         */
    +        protected MaximizeAction() {}
             public void actionPerformed(ActionEvent evt) {
                 JDesktopPane dp = (JDesktopPane)evt.getSource();
                 SHARED_ACTION.setState(dp, Actions.MAXIMIZE);
    @@ -750,6 +766,10 @@ public boolean isEnabled() {
          */
         @SuppressWarnings("serial") // Superclass is not serializable across versions
         protected class NavigateAction extends AbstractAction {
    +        /**
    +         * Constructs a {@code NavigateAction}.
    +         */
    +        protected NavigateAction() {}
             public void actionPerformed(ActionEvent evt) {
                 JDesktopPane dp = (JDesktopPane)evt.getSource();
                 dp.selectFrame(true);
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
    index 8ed05e07861..18f94db3040 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
    @@ -757,6 +757,12 @@ public void mouseClicked(MouseEvent e) {
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
    +
    +        /**
    +         * Constructs a {@code SelectionListener}.
    +         */
    +        protected SelectionListener() {}
    +
             /** {@inheritDoc} */
             public void valueChanged(ListSelectionEvent e) {
                 getHandler().valueChanged(e);
    @@ -1325,6 +1331,11 @@ public String getDescription() {
          */
         @SuppressWarnings("serial") // Superclass is not serializable across versions
         protected class CancelSelectionAction extends AbstractAction {
    +        /**
    +         * Constructs a {@code CancelSelectionAction}.
    +         */
    +        protected CancelSelectionAction() {}
    +
             /** {@inheritDoc} */
             public void actionPerformed(ActionEvent e) {
                 getFileChooser().cancelSelection();
    @@ -1336,6 +1347,11 @@ public void actionPerformed(ActionEvent e) {
          */
         @SuppressWarnings("serial") // Superclass is not serializable across versions
         protected class UpdateAction extends AbstractAction {
    +        /**
    +         * Constructs an {@code UpdateAction}.
    +         */
    +        protected UpdateAction() {}
    +
             /** {@inheritDoc} */
             public void actionPerformed(ActionEvent e) {
                 JFileChooser fc = getFileChooser();
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
    index 690a7001692..35560bf558c 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
    @@ -34,6 +34,11 @@
      * @since 1.4
      */
     public class BasicFormattedTextFieldUI extends BasicTextFieldUI {
    +    /**
    +     * Constructs a {@code BasicFormattedTextFieldUI}.
    +     */
    +    public BasicFormattedTextFieldUI() {}
    +
         /**
          * Creates a UI for a JFormattedTextField.
          *
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
    index 26c4b6f73fe..e7febd97f09 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
    @@ -51,6 +51,11 @@
         private static final Insets GROOVE_INSETS = new Insets(2, 2, 2, 2);
         private static final Insets ETCHED_INSETS = new Insets(2, 2, 2, 2);
     
    +    /**
    +     * Constructs a {@code BasicGraphicsUtils}.
    +     */
    +    public BasicGraphicsUtils() {}
    +
         /**
          * Draws an etched rectangle.
          *
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java
    index 85304d92e34..3e1108fb25b 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java
    @@ -46,6 +46,11 @@
      */
     public class BasicHTML {
     
    +    /**
    +     * Constructs a {@code BasicHTML}.
    +     */
    +    public BasicHTML() {}
    +
         /**
          * Create an html renderer for the given component and
          * string of html.
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java
    index b8c0465b329..8b38a29e1ed 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java
    @@ -61,6 +61,11 @@
         private static Icon menuItemArrowIcon;
         private static Icon menuArrowIcon;
     
    +    /**
    +     * Constructs a {@code BasicIconFactory}.
    +     */
    +    public BasicIconFactory() {}
    +
         /**
          * Returns a menu item check icon.
          *
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
    index 72b2d8be536..1a21268d74c 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
    @@ -723,6 +723,11 @@ public void layoutContainer(Container c) {
          * Instantiate it only within subclasses of <code>Foo</code>.
          */
         public class PropertyChangeHandler implements PropertyChangeListener {
    +        /**
    +         * Constructs a {@code PropertyChangeHandler}.
    +         */
    +        public PropertyChangeHandler() {}
    +
             // NOTE: This class exists only for backward compatibility. All
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
    @@ -741,6 +746,11 @@ public void propertyChange(PropertyChangeEvent evt) {
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
    +        /**
    +         * Constructs a {@code TitlePaneLayout}.
    +         */
    +        public TitlePaneLayout() {}
    +
             public void addLayoutComponent(String name, Component c) {
                 getHandler().addLayoutComponent(name, c);
             }
    @@ -930,6 +940,10 @@ public void actionPerformed(ActionEvent e) {
          */
         @SuppressWarnings("deprecation")
         public class SystemMenuBar extends JMenuBar {
    +        /**
    +         * Constructs a {@code SystemMenuBar}.
    +         */
    +        public SystemMenuBar() {}
             public boolean isFocusTraversable() { return false; }
             public void requestFocus() {}
             public void paint(Graphics g) {
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java
    index 86d6686e41a..273034539f0 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java
    @@ -646,6 +646,10 @@ public void setEastPane(JComponent c) {
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
    +        /**
    +         * Constructs a {@code InternalFramePropertyChangeListener}.
    +         */
    +        public InternalFramePropertyChangeListener() {}
             /**
              * Detects changes in state from the JInternalFrame and handles
              * actions.
    @@ -663,6 +667,11 @@ public void propertyChange(PropertyChangeEvent evt) {
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
    +    /**
    +     * Constructs a {@code InternalFrameLayout}.
    +     */
    +    public InternalFrameLayout() {}
    +
           /**
            * {@inheritDoc}
            */
    @@ -842,6 +851,11 @@ protected void deactivateFrame(JInternalFrame f) {
     
             int resizeCornerSize = 16;
     
    +        /**
    +         * Constructs a {@code BorderListener}.
    +         */
    +        protected BorderListener() {}
    +
             public void mouseClicked(MouseEvent e) {
                 if(e.getClickCount() > 1 && e.getSource() == getNorthPane()) {
                     if(frame.isIconifiable() && frame.isIcon()) {
    @@ -1305,6 +1319,11 @@ public void mouseExited(MouseEvent e)    {
           // its functionality has been moved into Handler. If you need to add
           // new functionality add it to the Handler, but make sure this
           // class calls into the Handler.
    +      /**
    +       * Constructs a {@code ComponentHandler}.
    +       */
    +      protected ComponentHandler() {}
    +
           /** Invoked when a JInternalFrame's parent's size changes. */
           public void componentResized(ComponentEvent e) {
               getHandler().componentResized(e);
    @@ -1347,6 +1366,11 @@ protected ComponentListener createComponentListener() {
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
    +        /**
    +         * Constructs a {@code GlassPaneDispatcher}.
    +         */
    +        protected GlassPaneDispatcher() {}
    +
             /**
              * {@inheritDoc}
              */
    @@ -1414,6 +1438,11 @@ protected MouseInputListener createGlassPaneDispatcher() {
           // its functionality has been moved into Handler. If you need to add
           // new functionality add it to the Handler, but make sure this
           // class calls into the Handler.
    +      /**
    +       * Constructs a {@code BasicInternalFrameListener}.
    +       */
    +      protected BasicInternalFrameListener() {}
    +
             /**
              * {@inheritDoc}
              */
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java
    index 3d036358e6d..be0487d3893 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java
    @@ -928,6 +928,11 @@ else if (me == null)
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
     
    +        /**
    +         * Constructs a {@code MouseInputHandler}.
    +         */
    +        protected MouseInputHandler() {}
    +
             /** {@inheritDoc} */
             public void mouseClicked(MouseEvent e) {
                 getHandler().mouseClicked(e);
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java
    index ba60b557d82..33699871a18 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java
    @@ -370,6 +370,11 @@ private void updateDefaultBackgroundColor() {
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
     
    +        /**
    +         * Constructs a {@code MouseInputHandler}.
    +         */
    +        protected MouseInputHandler() {}
    +
             public void mouseClicked(MouseEvent e) {
                 getHandler().mouseClicked(e);
             }
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java
    index b63274d4836..afb2d58b885 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java
    @@ -1176,6 +1176,11 @@ public boolean getSupportsAbsolutePositioning() {
          * A listener to listen for model changes.
          */
         protected class ModelListener implements ChangeListener {
    +        /**
    +         * Constructs a {@code ModelListener}.
    +         */
    +        protected ModelListener() {}
    +
             public void stateChanged(ChangeEvent e) {
                 if (!useCachedValue) {
                     scrollBarValue = scrollbar.getValue();
    @@ -1200,6 +1205,11 @@ public void stateChanged(ChangeEvent e) {
             protected transient int currentMouseY;
             private transient int direction = +1;
     
    +        /**
    +         * Constructs a {@code TrackListener}.
    +         */
    +        protected TrackListener() {}
    +
             /** {@inheritDoc} */
             public void mouseReleased(MouseEvent e)
             {
    @@ -1498,6 +1508,11 @@ public void mouseExited(MouseEvent e) {
             // (keyfocus on scrollbars causes action without mousePress
             boolean handledEvent;
     
    +        /**
    +         * Constructs an {@code ArrowButtonListener}.
    +         */
    +        protected ArrowButtonListener() {}
    +
             public void mousePressed(MouseEvent e)          {
                 if(!scrollbar.isEnabled()) { return; }
                 // not an unmodified left mouse button
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java
    index 7f80f4e51fa..f99afb35282 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java
    @@ -623,6 +623,11 @@ protected ChangeListener createVSBChangeListener() {
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
     
    +        /**
    +         * Constructs a {@code MouseWheelHandler}.
    +         */
    +        protected MouseWheelHandler() {}
    +
             /**
              * Called when the mouse wheel is rotated while over a
              * JScrollPane.
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java
    index b8054b750fd..c5ce2a64f9c 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java
    @@ -552,6 +552,11 @@ protected void finishDraggingTo(int location) {
         protected class MouseHandler extends MouseAdapter
                 implements MouseMotionListener
         {
    +        /**
    +         * Constructs a {@code MouseHandler}.
    +         */
    +        protected MouseHandler() {}
    +
             /**
              * Starts the dragging session by creating the appropriate instance
              * of DragController.
    @@ -955,6 +960,11 @@ protected int positionForMouseEvent(MouseEvent e) {
          */
         protected class DividerLayout implements LayoutManager
         {
    +        /**
    +         * Constructs a {@code DividerLayout}.
    +         */
    +        protected DividerLayout() {}
    +
             public void layoutContainer(Container c) {
                 if (leftButton != null && rightButton != null &&
                     c == BasicSplitPaneDivider.this) {
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java
    index 643c5419f74..24b2fa873f1 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java
    @@ -714,6 +714,11 @@ int getKeyboardMoveIncrement() {
          */
         public class PropertyHandler implements PropertyChangeListener
         {
    +        /**
    +         * Constructs a {@code PropertyHandler}.
    +         */
    +        public PropertyHandler() {}
    +
             // NOTE: This class exists only for backward compatibility. All
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
    @@ -766,6 +771,11 @@ public void focusLost(FocusEvent ev) {
          */
         public class KeyboardUpLeftHandler implements ActionListener
         {
    +        /**
    +         * Constructs a {@code KeyboardUpLeftHandler}.
    +         */
    +        public KeyboardUpLeftHandler() {}
    +
             public void actionPerformed(ActionEvent ev) {
                 if (dividerKeyboardResize) {
                     splitPane.setDividerLocation(Math.max(0,getDividerLocation
    @@ -861,6 +871,11 @@ public void actionPerformed(ActionEvent ev) {
          */
         public class KeyboardResizeToggleHandler implements ActionListener
         {
    +        /**
    +         * Constructs a {@code KeyboardResizeToggleHandler}.
    +         */
    +        public KeyboardResizeToggleHandler() {}
    +
             public void actionPerformed(ActionEvent ev) {
                 if (!dividerKeyboardResize) {
                     splitPane.requestFocus();
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
    index a81e3f06a83..8446354fe14 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
    @@ -210,6 +210,11 @@
     
     // UI creation
     
    +    /**
    +     * Constructs a {@code BasicTabbedPaneUI}.
    +     */
    +    public BasicTabbedPaneUI() {}
    +
         /**
          * Create a UI.
          * @param c a component
    @@ -2657,6 +2662,10 @@ else if (key == SCROLL_BACKWARD) {
          * Instantiate it only within subclasses of BasicTabbedPaneUI.
          */
         public class TabbedPaneLayout implements LayoutManager {
    +        /**
    +         * Constructs a {@code TabbedPaneLayout}.
    +         */
    +        public TabbedPaneLayout() {}
     
             public void addLayoutComponent(String name, Component comp) {}
     
    @@ -4195,6 +4204,11 @@ public void componentRemoved(ContainerEvent e) {
          * Instantiate it only within subclasses of BasicTabbedPaneUI.
          */
         public class PropertyChangeHandler implements PropertyChangeListener {
    +        /**
    +         * Constructs a {@code PropertyChangeHandler}.
    +         */
    +        public PropertyChangeHandler() {}
    +
             // NOTE: This class exists only for backward compatibility. All
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
    @@ -4209,6 +4223,11 @@ public void propertyChange(PropertyChangeEvent e) {
          * Instantiate it only within subclasses of BasicTabbedPaneUI.
          */
         public class TabSelectionHandler implements ChangeListener {
    +        /**
    +         * Constructs a {@code TabSelectionHandler}.
    +         */
    +        public TabSelectionHandler() {}
    +
             // NOTE: This class exists only for backward compatibility. All
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
    @@ -4223,6 +4242,11 @@ public void stateChanged(ChangeEvent e) {
          * Instantiate it only within subclasses of BasicTabbedPaneUI.
          */
         public class MouseHandler extends MouseAdapter {
    +        /**
    +         * Constructs a {@code MouseHandler}.
    +         */
    +        public MouseHandler() {}
    +
             // NOTE: This class exists only for backward compatibility. All
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
    @@ -4241,6 +4265,11 @@ public void mousePressed(MouseEvent e) {
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
    +        /**
    +         * Constructs a {@code FocusHandler}.
    +         */
    +        public FocusHandler() {}
    +
             public void focusGained(FocusEvent e) {
                 getHandler().focusGained(e);
             }
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java
    index a02d25f293b..721fcbda9b7 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java
    @@ -70,6 +70,11 @@
         // The column that should be highlighted when the table header has the focus.
         private int selectedColumnIndex = 0; // Read ONLY via getSelectedColumnIndex!
     
    +    /**
    +     * Constructs a {@code BasicTableHeaderUI}.
    +     */
    +    public BasicTableHeaderUI() {}
    +
         private static FocusListener focusListener = new FocusListener() {
             public void focusGained(FocusEvent e) {
                 repaintHeader(e.getSource());
    @@ -104,6 +109,11 @@ private void repaintHeader(Object source) {
             private int mouseXOffset;
             private Cursor otherCursor = resizeCursor;
     
    +        /**
    +         * Constructs a {@code MouseInputHandler}.
    +         */
    +        public MouseInputHandler() {}
    +
             public void mouseClicked(MouseEvent e) {
                 if (!header.isEnabled()) {
                     return;
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java
    index d38de7e51c0..2ee4f1fa26d 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java
    @@ -96,6 +96,11 @@
          */
         private boolean isFileList = false;
     
    +    /**
    +     * Constructs a {@code BasicTableUI}.
    +     */
    +    public BasicTableUI() {}
    +
     //
     //  Helper class for keyboard actions
     //
    @@ -760,6 +765,11 @@ public boolean accept(Object sender) {
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
    +        /**
    +         * Constructs a {@code KeyHandler}.
    +         */
    +        public KeyHandler() {}
    +
             public void keyPressed(KeyEvent e) {
                 getHandler().keyPressed(e);
             }
    @@ -786,6 +796,11 @@ public void keyTyped(KeyEvent e) {
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
    +        /**
    +         * Constructs a {@code FocusHandler}.
    +         */
    +        public FocusHandler() {}
    +
             public void focusGained(FocusEvent e) {
                 getHandler().focusGained(e);
             }
    @@ -808,6 +823,11 @@ public void focusLost(FocusEvent e) {
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
    +        /**
    +         * Constructs a {@code MouseInputHandler}.
    +         */
    +        public MouseInputHandler() {}
    +
             public void mouseClicked(MouseEvent e) {
                 getHandler().mouseClicked(e);
             }
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java
    index b52d365dd76..88decfc241a 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java
    @@ -1371,12 +1371,22 @@ public View create(Element elem, int p0, int p1) {
         /**
          * Default implementation of the interface {@code Caret}.
          */
    -    public static class BasicCaret extends DefaultCaret implements UIResource {}
    +    public static class BasicCaret extends DefaultCaret implements UIResource {
    +        /**
    +         * Constructs a {@code BasicCaret}.
    +         */
    +        public BasicCaret() {}
    +    }
     
         /**
          * Default implementation of the interface {@code Highlighter}.
          */
    -    public static class BasicHighlighter extends DefaultHighlighter implements UIResource {}
    +    public static class BasicHighlighter extends DefaultHighlighter implements UIResource {
    +        /**
    +         * Constructs a {@code BasicHighlighter}.
    +         */
    +        public BasicHighlighter() {}
    +    }
     
         static class BasicCursor extends Cursor implements UIResource {
             BasicCursor(int type) {
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java
    index 605a86ed088..bbe35ec526d 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java
    @@ -52,6 +52,11 @@
         //          Create PLAF
         // ********************************
     
    +    /**
    +     * Constructs a {@code BasicToggleButtonUI}.
    +     */
    +    public BasicToggleButtonUI() {}
    +
         /**
          * Returns an instance of {@code BasicToggleButtonUI}.
          *
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java
    index 4a5dd209df0..d26cec557aa 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java
    @@ -45,6 +45,11 @@
     
     public class BasicToolBarSeparatorUI extends BasicSeparatorUI
     {
    +    /**
    +     * Constructs a {@code BasicToolBarSeparatorUI}.
    +     */
    +    public BasicToolBarSeparatorUI() {}
    +
         /**
          * Returns a new instance of {@code BasicToolBarSeparatorUI}.
          *
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java
    index 3f5dad6dba9..480588eba2d 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java
    @@ -166,6 +166,11 @@
     
         private static String FOCUSED_COMP_INDEX = "JToolBar.focusedCompIndex";
     
    +    /**
    +     * Constructs a {@code BasicToolBarUI}.
    +     */
    +    public BasicToolBarUI() {}
    +
         /**
          * Constructs a new instance of {@code BasicToolBarUI}.
          *
    @@ -1408,6 +1413,11 @@ public void propertyChange(PropertyChangeEvent evt) {
          * The class listens for window events.
          */
         protected class FrameListener extends WindowAdapter {
    +        /**
    +         * Constructs a {@code FrameListener}.
    +         */
    +        protected FrameListener() {}
    +
             public void windowClosing(WindowEvent w) {
                 if (toolBar.isFloatable()) {
                     if (dragWindow != null)
    @@ -1450,6 +1460,11 @@ public void windowClosing(WindowEvent w) {
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
    +        /**
    +         * Constructs a {@code ToolBarContListener}.
    +         */
    +        protected ToolBarContListener() {}
    +
             public void componentAdded( ContainerEvent e )  {
                 getHandler().componentAdded(e);
             }
    @@ -1468,6 +1483,11 @@ public void componentRemoved( ContainerEvent e ) {
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
    +        /**
    +         * Constructs a {@code ToolBarFocusListener}.
    +         */
    +        protected ToolBarFocusListener() {}
    +
             public void focusGained( FocusEvent e ) {
                 getHandler().focusGained(e);
                 }
    @@ -1485,6 +1505,11 @@ public void focusLost( FocusEvent e ) {
             // its functionality has been moved into Handler. If you need to add
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
    +        /**
    +         * Constructs a {@code PropertyListener}.
    +         */
    +        protected PropertyListener() {}
    +
             public void propertyChange( PropertyChangeEvent e ) {
                 getHandler().propertyChange(e);
                 }
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java
    index 3ff0fa34bc2..6d1d85df643 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java
    @@ -2904,6 +2904,11 @@ private void repaintPath(TreePath path) {
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
     
    +        /**
    +         * Constructs a {@code TreeExpansionHandler}.
    +         */
    +        public TreeExpansionHandler() {}
    +
             /**
              * Called whenever an item in the tree has been expanded.
              */
    @@ -2931,6 +2936,11 @@ public void treeCollapsed(TreeExpansionEvent event) {
             /** ScrollBar that is being adjusted. */
             protected JScrollBar           scrollBar;
     
    +        /**
    +         * Constructs a {@code ComponentHandler}.
    +         */
    +        public ComponentHandler() {}
    +
             public void componentMoved(ComponentEvent e) {
                 if(timer == null) {
                     JScrollPane   scrollPane = getScrollPane();
    @@ -3008,6 +3018,11 @@ public void actionPerformed(ActionEvent ae) {
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
     
    +        /**
    +         * Constructs a {@code TreeModelHandler}.
    +         */
    +        public TreeModelHandler() {}
    +
             public void treeNodesChanged(TreeModelEvent e) {
                 getHandler().treeNodesChanged(e);
             }
    @@ -3037,6 +3052,11 @@ public void treeStructureChanged(TreeModelEvent e) {
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
     
    +        /**
    +         * Constructs a {@code TreeSelectionHandler}.
    +         */
    +        public TreeSelectionHandler() {}
    +
             /**
              * Messaged when the selection changes in the tree we're displaying
              * for.  Stops editing, messages super and displays the changed paths.
    @@ -3058,6 +3078,11 @@ public void valueChanged(TreeSelectionEvent event) {
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
     
    +        /**
    +         * Constructs a {@code CellEditorHandler}.
    +         */
    +        public CellEditorHandler() {}
    +
             /** Messaged when editing has stopped in the tree. */
             public void editingStopped(ChangeEvent e) {
                 getHandler().editingStopped(e);
    @@ -3091,6 +3116,11 @@ public void editingCanceled(ChangeEvent e) {
             /** Set to true while keyPressed is active. */
             protected boolean            isKeyDown;
     
    +        /**
    +         * Constructs a {@code KeyHandler}.
    +         */
    +        public KeyHandler() {}
    +
             /**
              * Invoked when a key has been typed.
              *
    @@ -3123,6 +3153,11 @@ public void keyReleased(KeyEvent e) {
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
     
    +        /**
    +         * Constructs a {@code FocusHandler}.
    +         */
    +        public FocusHandler() {}
    +
             /**
              * Invoked when focus is activated on the tree we're in, redraws the
              * lead row.
    @@ -3149,6 +3184,11 @@ public void focusLost(FocusEvent e) {
         // This returns locations that don't include any Insets.
         public class NodeDimensionsHandler extends
                      AbstractLayoutCache.NodeDimensions {
    +        /**
    +         * Constructs a {@code NodeDimensionsHandler}.
    +         */
    +        public NodeDimensionsHandler() {}
    +
             /**
              * Responsible for getting the size of a particular node.
              */
    @@ -3229,6 +3269,11 @@ protected int getRowX(int row, int depth) {
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
     
    +        /**
    +         * Constructs a {@code MouseHandler}.
    +         */
    +        public MouseHandler() {}
    +
             /**
              * Invoked when a mouse button has been pressed on a component.
              */
    @@ -3267,6 +3312,11 @@ public void mouseReleased(MouseEvent e) {
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
     
    +        /**
    +         * Constructs a {@code PropertyChangeHandler}.
    +         */
    +        public PropertyChangeHandler() {}
    +
             public void propertyChange(PropertyChangeEvent event) {
                 getHandler().propertyChange(event);
             }
    @@ -3285,6 +3335,11 @@ public void propertyChange(PropertyChangeEvent event) {
             // new functionality add it to the Handler, but make sure this
             // class calls into the Handler.
     
    +        /**
    +         * Constructs a {@code SelectionModelPropertyChangeHandler}.
    +         */
    +        public SelectionModelPropertyChangeHandler() {}
    +
             public void propertyChange(PropertyChangeEvent event) {
                 getHandler().propertyChange(event);
             }
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicViewportUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicViewportUI.java
    index 3620bdbcff8..6326d2ea957 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicViewportUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicViewportUI.java
    @@ -43,6 +43,11 @@
         // Shared UI object
         private static ViewportUI viewportUI;
     
    +    /**
    +     * Constructs a {@code BasicViewportUI}.
    +     */
    +    public BasicViewportUI() {}
    +
         /**
          * Returns an instance of {@code BasicViewportUI}.
          *
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java
    index f4c418fa948..895379c1864 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java
    @@ -586,6 +586,10 @@ public  SingleClickListener(JList<?> list) {
         @Deprecated(since = "9")
         @SuppressWarnings("serial") // Superclass is not serializable across versions
         protected class FileRenderer extends DefaultListCellRenderer  {
    +        /**
    +         * Constructs a {@code FileRenderer}.
    +         */
    +        protected FileRenderer() {}
         }
     
         public void uninstallUI(JComponent c) {
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalSliderUI.java b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalSliderUI.java
    index bd1d2e6b41b..d79bfee81b7 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalSliderUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalSliderUI.java
    @@ -180,6 +180,11 @@ protected PropertyChangeListener createPropertyChangeListener( JSlider slider )
          * {@code PropertyListener} for {@code JSlider.isFilled}.
          */
         protected class MetalPropertyListener extends BasicSliderUI.PropertyChangeHandler {
    +        /**
    +         * Constructs a {@code MetalPropertyListener}.
    +         */
    +        protected MetalPropertyListener() {}
    +
             public void propertyChange( PropertyChangeEvent e ) {  // listen for slider fill
                 super.propertyChange( e );
     
    diff --git a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java
    index 15c9fd8eb13..1f89cd88ec0 100644
    --- a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java
    +++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java
    @@ -85,6 +85,11 @@
          */
         private JMenuBar lastMenuBar;
     
    +    /**
    +     * Constructs a {@code MetalToolBarUI}.
    +     */
    +    public MetalToolBarUI() {}
    +
         /**
          * Registers the specified component.
          */
    @@ -361,13 +366,23 @@ private void setLastMenuBar(JMenuBar lastMenuBar) {
          * No longer used. The class cannot be removed for compatibility reasons.
          */
         protected class MetalContainerListener
    -        extends BasicToolBarUI.ToolBarContListener {}
    +        extends BasicToolBarUI.ToolBarContListener {
    +        /**
    +         * Constructs a {@code MetalContainerListener}.
    +         */
    +        protected MetalContainerListener() {}
    +    }
     
         /**
          * No longer used. The class cannot be removed for compatibility reasons.
          */
         protected class MetalRolloverListener
    -        extends BasicToolBarUI.PropertyListener {}
    +        extends BasicToolBarUI.PropertyListener {
    +        /**
    +         * Constructs a {@code MetalRolloverListener}.
    +         */
    +        protected MetalRolloverListener() {}
    +    }
     
         /**
          * {@code DockingListener} for {@code MetalToolBarUI}.




Comments
Moving to Approved.
24-09-2020