JideTabbedPane :: NPE when using WRAP_TAB_LAYOUT policy

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

JideTabbedPane :: NPE when using WRAP_TAB_LAYOUT policy

Postby apavlik » Fri May 15, 2009 4:49 am

Hello,

Sorry if this is not the right place to ask.

I've got a problem using JideTabbedPane (2.5.1) with tab layout policy set to WRAP_TAB_LAYOUT.

Here is a sample app:
Code: Select all
import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.SwingUtilities;
import com.jidesoft.swing.JideTabbedPane;

public class TabbedPaneTest extends JFrame
{
    public TabbedPaneTest()
    {
        super("tabs test");
        buildUI();
    }

    private void buildUI()
    {
        JPanel content = new JPanel(new BorderLayout());
       
        JideTabbedPane tabs = new JideTabbedPane();
        tabs.addTab("tab 1", new JPanel());

        tabs.setTabLayoutPolicy(JTabbedPane.WRAP_TAB_LAYOUT);
        tabs.setTabShape(JideTabbedPane.SHAPE_EXCEL);
       
        content.add(tabs, BorderLayout.CENTER);
        getContentPane().add(content);
       
        setSize(300, 300);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
    }
   
    public static void main(String[] args)
    {
        SwingUtilities.invokeLater(new Runnable()
        {
            @Override
            public void run()
            {
                TabbedPaneTest test = new TabbedPaneTest();
                test.setVisible(true);
            }
        });
    }
}

An exception is thrown when I start the app:
Code: Select all
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
   at com.jidesoft.plaf.vsnet.VsnetJideTabbedPaneUI.paintContentBorderTopEdge(Unknown Source)
   at com.jidesoft.plaf.basic.BasicJideTabbedPaneUI.paintContentBorder(Unknown Source)
   at com.jidesoft.plaf.basic.BasicJideTabbedPaneUI.paint(Unknown Source)
   at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
   at javax.swing.JComponent.paintComponent(JComponent.java:763)
   at javax.swing.JComponent.paint(JComponent.java:1027)
   at javax.swing.JComponent.paintChildren(JComponent.java:864)
   at javax.swing.JComponent.paint(JComponent.java:1036)
   at javax.swing.JComponent.paintChildren(JComponent.java:864)
   at javax.swing.JComponent.paint(JComponent.java:1036)
   at javax.swing.JComponent.paintChildren(JComponent.java:864)
   at javax.swing.JComponent.paint(JComponent.java:1036)
   at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
   at javax.swing.JComponent.paintChildren(JComponent.java:864)
   at javax.swing.JComponent.paintToOffscreen(JComponent.java:5129)
   at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:277)
   at javax.swing.RepaintManager.paint(RepaintManager.java:1217)
   at javax.swing.JComponent.paint(JComponent.java:1013)
   at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
   at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
   at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
   at java.awt.Container.paint(Container.java:1780)
   at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
   at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
   at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
   at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


The sample code works fine if I change line
Code: Select all
tabs.setTabLayoutPolicy(JTabbedPane.WRAP_TAB_LAYOUT);

to
Code: Select all
tabs.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);


Would appreciate any input on the issue...
Thanks
ps. My PC's running Ubuntu 9.04 (Java(TM) SE Runtime Environment (build 1.6.0_13-b03))
apavlik
 
Posts: 1
Joined: Wed Jan 14, 2009 2:25 am

Re: JideTabbedPane :: NPE when using WRAP_TAB_LAYOUT policy

Postby JIDE Support » Fri May 15, 2009 8:48 am

It is expected, JideTabbedPane doesn't support WRAP_TAB_LAYOUT. It only supports SCROLL_TAB_LAYOUT. We don't plan to support WRAP_TAB_LAYOUT for the moment.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 34004
Joined: Sun Sep 14, 2003 10:49 am

Re: JideTabbedPane :: NPE when using WRAP_TAB_LAYOUT policy

Postby laurentapo » Fri Sep 17, 2010 4:46 am

Did you plan to support WRAP_TAB_LAYOUT on JideTabbedPane ?

Thanks for your response
Laurent
laurentapo
 
Posts: 9
Joined: Mon Oct 29, 2007 9:01 am

Re: JideTabbedPane :: NPE when using WRAP_TAB_LAYOUT policy

Postby JIDE Support » Fri Sep 17, 2010 9:10 am

So far we still don't have a plan to support it yet.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 34004
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 2 guests

cron