ICEpdf
  1. ICEpdf
  2. PDF-382

ViewerComponentExample Broken in Version 4.3

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.3
    • Fix Version/s: 4.3.1
    • Component/s: Core/Parsing, Viewer RI
    • Labels:
      None
    • Environment:
      jdk 1.6
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
          // workaround //
          ResourceBundle. res = ResourceBundle.getBundle( PropertiesManager.DEFAULT_MESSAGE_BUNDLE );
          PropertiesManager pm = new PropertiesManager( System.getProperties(), res );
          // build a component controller
          SwingController controller = new SwingController();
          SwingViewBuilder factory = new SwingViewBuilder(controller, pm);
          JPanel viewerComponentPanel = factory.buildViewerPanel();
      Show
          // workaround //     ResourceBundle. res = ResourceBundle.getBundle( PropertiesManager.DEFAULT_MESSAGE_BUNDLE );     PropertiesManager pm = new PropertiesManager( System.getProperties(), res );     // build a component controller     SwingController controller = new SwingController();     SwingViewBuilder factory = new SwingViewBuilder(controller, pm);     JPanel viewerComponentPanel = factory.buildViewerPanel();

      Description

      In main(String[]) the following example code is given:

          // build a component controller
          SwingController controller = new SwingController();
          SwingViewBuilder factory = new SwingViewBuilder(controller);
          JPanel viewerComponentPanel = factory.buildViewerPanel();

      However calling "factory.buildViewerPanel()" throws a NullPointerException:

          Exception in thread "main" java.lang.NullPointerException
              at org.icepdf.ri.common.ThumbnailsPanel.<init>(ThumbnailsPanel.java:60)
              at org.icepdf.ri.common.SwingViewBuilder.buildThumbsPanel(SwingViewBuilder.java:1565)
              at org.icepdf.ri.common.SwingViewBuilder.buildUtilityTabbedPane(SwingViewBuilder.java:1533)
              at org.icepdf.ri.common.SwingViewBuilder.buildUtilityAndDocumentSplitPane(SwingViewBuilder.java:1483)
              at org.icepdf.ri.common.SwingViewBuilder.buildContents(SwingViewBuilder.java:481)
              at org.icepdf.ri.common.SwingViewBuilder.buildViewerPanel(SwingViewBuilder.java:464)
              at ViewerComponentExample.main(ViewerComponentExample.java:41)

        Activity

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Nathan Ciliberto
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: