Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5291

[classlib][swing][EIOffice] JList.SetUI(null) causes some methods throw NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.0M4
    • None
    • Classlib
    • None

    Description

      JList.SetUI(null) causes some methods throw NPE in JList class.
      Such as indexToLocation(int);

      import javax.swing.JFrame;
      import javax.swing.JList;

      public class ListUIDemo extends JFrame {
      final JList list;
      CellRendererDemo() {
      list = new JList(new String[]

      { "a", "b", "c" }

      );
      add(list);
      list.setUI(null);
      list.indexToLocation(0);
      setBounds(0, 0, 200,200);
      setVisible(true);
      }

      public static void main(String[] args)

      { new ListUIDemo(); }

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            evaol Linbin Yu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: