Resizing Problems

2003-09-11
2003-09-11
  • Hello all at Compaire Look and feel,
    I'm using the Compaire Look and feel editer and recieving an exception.

    A user chooses Select Theme from the the menu and this code is run

    new org.compiere.plaf.CompierePLAFEditor ((Frame)this,false);

    where "this" is a JFrame.

    The parent frame resizes to the full screen size and the compiere editer appears, parent Frame shifts its location to the botom right portion of the screen.

    Also how can the users theme be remembered the next time the program is invoked?

    Heres the exception.

    java.lang.NullPointerException
            at javax.swing.DefaultListCellRenderer.getListCellRendererComponent(Defa
    ultListCellRenderer.java:80)
            at javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize(BasicComboBoxUI
    .java:1280)
            at javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize(BasicComboBoxUI
    .java:965)
            at javax.swing.plaf.metal.MetalComboBoxUI.getMinimumSize(MetalComboBoxUI
    .java:196)
            at javax.swing.plaf.basic.BasicComboBoxUI.getPreferredSize(BasicComboBox
    UI.java:955)
            at javax.swing.JComponent.getPreferredSize(JComponent.java:1272)
            at java.awt.FlowLayout.preferredLayoutSize(FlowLayout.java:322)
            at java.awt.Container.preferredSize(Container.java:1175)
            at java.awt.Container.getPreferredSize(Container.java:1159)
            at javax.swing.JComponent.getPreferredSize(JComponent.java:1274)
            at java.awt.BorderLayout.layoutContainer(BorderLayout.java:660)
            at java.awt.Container.layout(Container.java:1017)
            at java.awt.Container.doLayout(Container.java:1007)
            at java.awt.Container.validateTree(Container.java:1089)
            at java.awt.Container.validateTree(Container.java:1096)
            at java.awt.Container.validate(Container.java:1064)
            at javax.swing.plaf.basic.BasicTabbedPaneUI.ensureCurrentLayout(BasicTab
    bedPaneUI.java:1145)
            at javax.swing.plaf.basic.BasicTabbedPaneUI.paint(BasicTabbedPaneUI.java
    :490)
            at javax.swing.plaf.metal.MetalTabbedPaneUI.paint(MetalTabbedPaneUI.java
    :666)
            at org.compiere.plaf.CompiereTabbedPaneUI.paint(CompiereTabbedPaneUI.jav
    a:131)
            at org.compiere.plaf.CompiereTabbedPaneUI.update(CompiereTabbedPaneUI.ja
    va:85)
            at javax.swing.JComponent.paintComponent(JComponent.java:541)
            at javax.swing.JComponent.paint(JComponent.java:808)
            at javax.swing.JComponent.paintChildren(JComponent.java:647)
            at javax.swing.JComponent.paint(JComponent.java:817)
            at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4771)

            at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4724)
            at javax.swing.JComponent._paintImmediately(JComponent.java:4668)
            at javax.swing.JComponent.paintImmediately(JComponent.java:4477)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)

            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(System
    EventQueueUtilities.java:117)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:197)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:150)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)

            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)

            at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    java.lang.NullPointerException
            at javax.swing.DefaultListCellRenderer.getListCellRendererComponent(Defa
    ultListCellRenderer.java:80)
            at javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize(BasicComboBoxUI
    .java:1280)
            at javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize(BasicComboBoxUI
    .java:965)
            at javax.swing.plaf.metal.MetalComboBoxUI.getMinimumSize(MetalComboBoxUI
    .java:196)
            at javax.swing.plaf.basic.BasicComboBoxUI.getPreferredSize(BasicComboBox
    UI.java:955)
            at javax.swing.JComponent.getPreferredSize(JComponent.java:1272)
            at java.awt.FlowLayout.preferredLayoutSize(FlowLayout.java:322)
            at java.awt.Container.preferredSize(Container.java:1175)
            at java.awt.Container.getPreferredSize(Container.java:1159)
            at javax.swing.JComponent.getPreferredSize(JComponent.java:1274)
            at java.awt.BorderLayout.preferredLayoutSize(BorderLayout.java:569)
            at java.awt.Container.preferredSize(Container.java:1175)
            at java.awt.Container.getPreferredSize(Container.java:1159)
            at javax.swing.JComponent.getPreferredSize(JComponent.java:1274)
            at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateSi
    ze(BasicTabbedPaneUI.java:1992)
            at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.preferredLa
    youtSize(BasicTabbedPaneUI.java:1966)
            at java.awt.Container.preferredSize(Container.java:1175)
            at java.awt.Container.getPreferredSize(Container.java:1159)
            at javax.swing.JComponent.getPreferredSize(JComponent.java:1274)
            at java.awt.GridBagLayout.GetLayoutInfo(GridBagLayout.java:892)
            at java.awt.GridBagLayout.getLayoutInfo(GridBagLayout.java:806)
            at java.awt.GridBagLayout.ArrangeGrid(GridBagLayout.java:1373)
            at java.awt.GridBagLayout.arrangeGrid(GridBagLayout.java:1336)
            at java.awt.GridBagLayout.layoutContainer(GridBagLayout.java:706)
            at java.awt.Container.layout(Container.java:1017)
            at java.awt.Container.doLayout(Container.java:1007)
            at java.awt.Container.validateTree(Container.java:1089)
            at java.awt.Container.validateTree(Container.java:1096)
            at java.awt.Container.validateTree(Container.java:1096)
            at java.awt.Container.validate(Container.java:1064)
            at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.j
    ava:353)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(System
    EventQueueUtilities.java:116)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:197)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:150)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)

            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)

            at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)10.0!NativeFontCtl

     
    • From the error message I guess this is something to do with resizing a combo box. Is this component supported?

       
    • I uppdated to version 1.2.1

      The exception now only occours with the Motief and Windows theme.

      However the resizing and repositioning  of the parent frame allways occours is there anyway to prevent the parent frame from being repositioned or resized?