Problem with JTabbedPane

Hi

I am trying to remove a tab from a tabbedPane.

I simply say

tabbedPane.remove(0);// this removes tab at index 0.

When i use jdk1.6+

this statement throws an excpetion ArrayIndexOutOfBounds,otherwise it works(if i use jdk versions below 1.6)

Same problem occurs if i use

tabbedPane.removeTabAt(0)

Is there anyotherway of removing the tab so that it works on any version.

I am using JNLP,ie my application is a webstart application.Is it something to do with this?

Please help

[577 byte] By [Me_Scorpioa] at [2007-11-27 0:13:05]
# 1

Removing of a tab from the tabbedPane is happening inside a new thread.

(new Thread() {

@Override

public void run() {

try {

pCardsUI.curCardElement = cardImageInfoDoc

.getRootElement().getChild("cardBack");

pCardsUI

.UpdateCurrentCardElement(pCardsUI.curCardElement);

pCardsUI.curCardElement = pCardsUI.cardImageInfoDoc

.getRootElement().getChild("card1");

imageCombo.setEnabled(false);

mirrorCheckBox.setEnabled(false);

mirrorCheckBox.setSelected(false);

mirroredFlag = false;

transformCombo.setEnabled(false);

transformCombo.setSelectedItem("No Transform");

separatorButton.setEnabled(false);

rotateButton.setEnabled(false);

separatorImageName = "";

rotateAngle = 0;

txtInfos.clear();

aspectRatio = 1.615;

for(int i=0;i<tabbedPane.getTabCount();i++){

System.out.println(tabbedPane.getTitleAt(i)+ "-" +i);

}

//tabbedPane.removeTabAt(0);

tabbedPane.remove(0);

}

}

}).start();

Has it got something to do with this?>

Me_Scorpioa at 2007-7-11 21:56:20 > top of Java-index,Desktop,Core GUI APIs...