Harmony
  1. Harmony
  2. HARMONY-5291

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

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 5.0M4
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      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(); }

      }

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Linbin Yu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development