JDesktop Web Component Crashing



I have a JTabbedPane with one tab that is a WebBrowser component that
is provided by JDIC. I would like to give the user the ability to move
the tabs position, but when I do this to this particular tab, JDIC
crashes: "JDesktop Integration Components binary has encountered a
problem and needs to close. We are sorry for the inconvenience.".

Here is the code that moves the tab:

public void moveTab(int direction) {

// get the current focused tab
int newTabPos, selectedTab = getSelectedIndex();

if (direction == MOVE_RIGHT) {
if (selectedTab == getTabCount() - 1)
return;

newTabPos = selectedTab + 1;
} else if (direction == MOVE_LEFT) {
if (selectedTab == 0)
return;

newTabPos = selectedTab - 1;
} else {
return;
}

// Get all the properties
Component comp = getComponentAt(selectedTab);
String label = getTitleAt(selectedTab);
Icon icon = getIconAt(selectedTab);
Icon iconDis = getDisabledIconAt(selectedTab);
String tooltip = getToolTipTextAt(selectedTab);
boolean enabled = isEnabledAt(selectedTab);
int keycode = getMnemonicAt(selectedTab);
int mnemonicLoc = getDisplayedMnemonicIndexAt(selectedTab);
Color fg = getForegroundAt(selectedTab);
Color bg = getBackgroundAt(selectedTab);

// Remove the tab
remove(selectedTab);

// Add a new tab
insertTab(label, icon, comp, tooltip, newTabPos);

// Restore all properties
setDisabledIconAt(newTabPos, iconDis);
setEnabledAt(newTabPos, enabled);
setMnemonicAt(newTabPos, keycode);
setDisplayedMnemonicIndexAt(newTabPos, mnemonicLoc);
setForegroundAt(newTabPos, fg);
setBackgroundAt(newTabPos, bg);
setSelectedIndex(newTabPos);
}

Thanks in advance for any help I get!!

Gregg

.



Relevant Pages

  • Re: viewing file extensions and associations
    ... The problem is the associated icon for .doc - it is the one for wordpad not ... >>I have a problem with viewing file extensions/associations. ... Also on this tab, the advanced ... >> The related problem is that all my MS Word .doc files have the MS WordPad ...
    (microsoft.public.windowsxp.general)
  • Re: IE dehanced?
    ... tab is a blank button. ... The icon only shows up if I hover over it! ... That space is FOR the tabs and command bar... ... the huge gap of wasted space in the center of the toolbar area!! ...
    (microsoft.public.windowsxp.general)
  • Device Manager questions
    ... The Properties/General and Driver tabs shows the same data for both of them. ... Are these the code that for the extended keys on the keyboard and extended ... On the Details tab the strings are different. ... icon attached. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Please help me create the template in my post
    ... adjustment of the left margin setting or by a tab (note: ... The main text body should not be in a table -- and if that icon to the ... Sometimes it takes a few responses before the best or complete solution ...
    (microsoft.public.mac.office.word)
  • Re: [Help] TabIndex on Pocket PC???
    ... there is support for Tab and Z-order. ... On your other question - associating an icon with your CF project in VS.Net ... It worked for everything but the TAB key both on the Keyboard ... >> your control and then set focus to the next control you want to work ...
    (microsoft.public.pocketpc.developer)