Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-633

GUI Builder fails to load sub-panel with NLS / Respource bundle

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8.2, 9.0
    • Fix Version/s: 11.0
    • Component/s: third-party - Other
    • Environment:

      Description

      expected

      • To be able to view and edit parent JPanel screen in Netbeans GUI Builder.
      • This should be possible no matter what the sub-panels do
      • If/when a resource is missing or unresolved some kind of place holder can be used

      actual

      • We have several GUI JPanel-s which act as containers for a "details" screen, sub-panel layouts.
      • In one of the sub-panels we introduced a resource bundle to display options for check-boxes.. 
      • This details screen works as a sub-panel at run-time.
      • This details screen works as in the GUI designer/builder fine.
      • However whenever we load the parent panel, the container it fails with a MissingResourceException.

       

      • This is somewhat of a SHOW STOPPER as far as internationalisation goes for reusable GUI components I'm afraid.
      • The situation is quite mysterious as well since the Resource file is found, loaded and displayed by the detail JPanel screen which is IN THE SAME java Package at runtime and design time.
      • The resource bundle itself is in the resources/bundles folder of common library (Gradle directory layout) and is "fixed" so to speak at design time.
      • I believe there is some fundamental flaw here because you must have parents able to load sub-components with or without any resource strings.

       

      supporting information

      --[ *stacktrace* ]--
      
      java.util.MissingResourceException: Can't find bundle for base name bundles/SpaAssurancesText, locale en_AU
          at java.base/java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2055)
          at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1689)
          at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1593)
          at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1556)
          at java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:857)
          at au.com.fourtel.fourabs.client.spas.JPanelSpaDetails.initComponents(JPanelSpaDetails.java:1608)
          at au.com.fourtel.fourabs.client.spas.JPanelSpaDetails.<init>(JPanelSpaDetails.java:148)
          at au.com.fourtel.fourabs.client.spas.JPanelSpaDetails.<init>(JPanelSpaDetails.java:141)
          at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
          at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
          at java.base/java.lang.Class.newInstance(Class.java:560)
          at org.netbeans.modules.form.CreationFactory.createDefaultInstance(CreationFactory.java:155)
          at org.netbeans.modules.form.RADComponent.createBeanInstance(RADComponent.java:227)
          at org.netbeans.modules.form.RADComponent.initInstance(RADComponent.java:166)
          at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:755)
          at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:943)
          at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:799)
          at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:943)
          at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:799)
          at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:943)
          at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:478)
          at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:258)
          at org.netbeans.modules.form.FormEditor$2.run(FormEditor.java:327)
          at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:268)
          at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEventAccess(NbMutexEventProvider.java:115)
          at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:75)
          at org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:71)
          at org.openide.util.Mutex.readAccess(Mutex.java:225)
          at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:251)
          at org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:324)
          at org.netbeans.modules.nbform.FormEditorSupport.loadOpeningForm(FormEditorSupport.java:436)
          at org.netbeans.modules.nbform.FormDesignerTC.loadForm(FormDesignerTC.java:256)
          at org.netbeans.modules.nbform.FormDesignerTC.access$300(FormDesignerTC.java:64)
          at org.netbeans.modules.nbform.FormDesignerTC$PreLoadTask$1.run(FormDesignerTC.java:245)
          at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
          at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
          at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
          at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
          at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
          at java.base/java.security.AccessController.doPrivileged(Native Method)
          at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
          at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
          at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
          at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
          at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
          at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
          at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
          at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
          at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      java.io.IOException: Undefined component referenced in layout: jPanelSpaDetails
          at org.netbeans.modules.form.layoutdesign.LayoutPersistenceManager.correctMissingName(LayoutPersistenceManager.java:712)
          at org.netbeans.modules.form.layoutdesign.LayoutPersistenceManager.loadLayout(LayoutPersistenceManager.java:388)
          at org.netbeans.modules.form.layoutdesign.LayoutPersistenceManager.loadContainer(LayoutPersistenceManager.java:354)
          at org.netbeans.modules.form.layoutdesign.LayoutModel.loadContainerLayout(LayoutModel.java:1206)
          at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:973)
          at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:799)
          at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:943)
          at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:799)
          at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:943)
          at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:478)
          at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:258)
          at org.netbeans.modules.form.FormEditor$2.run(FormEditor.java:327)
          at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:268)
          at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEventAccess(NbMutexEventProvider.java:115)
          at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:75)
          at org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:71)
          at org.openide.util.Mutex.readAccess(Mutex.java:225)
          at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:251)
          at org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:324)
          at org.netbeans.modules.nbform.FormEditorSupport.loadOpeningForm(FormEditorSupport.java:436)
          at org.netbeans.modules.nbform.FormDesignerTC.loadForm(FormDesignerTC.java:256)
          at org.netbeans.modules.nbform.FormDesignerTC.access$300(FormDesignerTC.java:64)
          at org.netbeans.modules.nbform.FormDesignerTC$PreLoadTask$1.run(FormDesignerTC.java:245)
          at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
          at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
          at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
          at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
          at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
          at java.base/java.security.AccessController.doPrivileged(Native Method)
          at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
          at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
          at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
          at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
          at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
          at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
          at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
          at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
          at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      

        Attachments

        1. image-2018-04-10-10-32-31-818.png
          14 kB
          will mason
        2. swing_bundles.7z
          5 kB
          will mason

          Activity

            People

            • Assignee:
              lkishalmi Laszlo Kishalmi
              Reporter:
              aplatypus will mason
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: