Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8057770

api/javax_swing/JScrollPane/indexTGF.html#UpdateUI failed with MotifLookAndFeel on all platform

XMLWordPrintable

    • b33
    • Verified

        Please see the following code:

        -----------------------------------------------------------------------------------------
        import javax.swing.*;
        import static java.lang.System.err;

        public class UpUI {

            public static void main(String[] args) {

                JScrollPane scrollPane = new JScrollPane();

                err.println(scrollPane.getPropertyChangeListeners().length);
                scrollPane.updateUI();
                err.println(scrollPane.getPropertyChangeListeners().length);
                scrollPane.updateUI();
                err.println(scrollPane.getPropertyChangeListeners().length);

            }
        }
        -----------------------------------------------------------------------------------------

        With MotifLookAndFeel the number of listeners will be growing - verified on JDK6, JDK7, JDK8, JDK8u26 (on Win/Solaris) - the output will be

        2
        3
        4

        While with default LaFs (on Win/Solaris) the output will be

        2
        2
        2


        The following test which is new to JCK8 (not present in JCK7) fails due to this

        api/javax_swing/JScrollPane/indexTGF.html\#UpdateUI[updateUI_PropertyChangeListener_list_notGrows]


        --- original report from JCK QA ---

        JDK 8 b129
        JCK 8a QAC b12

        Other Options
        -Dswing.defaultlaf=com.sun.java.swing.plaf.motif.MotifLookAndFeel
        ------------------------------------------------------------------------------------------

              azvegint Alexander Zvegintsev
              izlatkin Ilya Zlatkin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: