🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
1 messages
1 total messages Started by Zoran Pjevic Tue, 20 Jan 2004 15:08
TabbedPane Exception
#1364
Author: Zoran Pjevic
Date: Tue, 20 Jan 2004 15:08
71 lines
3287 bytes
I am using a TabbedPane with a dozen of tabs.

From time to time, mostly when starting the very first time, after
rebooting the machine I get following exception:


java.lang.ArrayIndexOutOfBoundsException: 1
	at
javax.swing.plaf.basic.BasicTabbedPaneUI.paintTabArea(Unknown Source)
	at javax.swing.plaf.basic.BasicTabbedPaneUI.paint(Unknown
Source)
	at javax.swing.plaf.ComponentUI.update(Unknown Source)
	at javax.swing.JComponent.paintComponent(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown
Source)
	at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown
Source)
	at
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown
Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

I have disabled now all threads that are dropping data to the tabbed
panels, but it still happens.

Basicallly what is left now - related to the tabbed panels is:

In the construtor of my frame:

JTabbedPane MyTabbedPane = new JTabbedPane();

 jTabbedPane_PSMMI.setEnabled(false);

 jTabbedPane_PSMMI.add(jPanel_1,  "Panel 1");
 jTabbedPane_PSMMI.add(jPanel_2,  "Panel 2");
...
 jTabbedPane_PSMMI.add(jPanel_11,  "Panel 11");
 jTabbedPane_PSMMI.add(jPanel_12,  "Panel 12");

And then later in my main loop:

if (MyjTabbedPane != null) {
  MyTabbedPane.setSelectedComponent(jPanel_10);
  MyTabbedPane.setEnabled(true);
}

From the dumped stack info I cannot relate the problem to my code.

Is this a known problem with the TabbedPane? I am using the 
java version 1.4.1-b21.

Or am I using it wrong?

Please help.

Thanks in advance,
Zoran
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads