Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2730 > unrolled thread

JDesktop Web Component Cr

Started by"Foreal" <foreal@THRWHITE.remove-dii-this>
First post2011-04-27 15:40 +0000
Last post2011-04-27 15:40 +0000
Articles 4 — 2 participants

Back to article view | Back to comp.lang.java.gui


Contents

  JDesktop Web Component Cr "Foreal" <foreal@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
    Re: JDesktop Web Componen "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
      Re: JDesktop Web Componen "Foreal" <foreal@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
        Re: JDesktop Web Componen "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000

#2730 — JDesktop Web Component Cr

From"Foreal" <foreal@THRWHITE.remove-dii-this>
Date2011-04-27 15:40 +0000
SubjectJDesktop Web Component Cr
Message-ID<1194386608.272953.251100@k79g2000hse.googlegroups.com>
  To: comp.lang.java.gui
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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#2732 — Re: JDesktop Web Componen

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:40 +0000
SubjectRe: JDesktop Web Componen
Message-ID<1194392137.015336.272890@i38g2000prf.googlegroups.com>
In reply to#2730
  To: comp.lang.java.gui
On Nov 7, 8:03 am, Foreal <galtsc...@gmail.com> wrote:
> 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.".


Sure.  Did you hava a question, or were you just making
a comment?

If 'asking a question' - you might try adding one in future.

In any case, I recommend the following course of
action to debug the code.
1) Prepare an example that does not involve the JDesktop
classes and also crashes, and post it here as an SSCCE
with a question attached.
2) If you can prepare an example as decribed in 1) but
it does *not* crash, that supports that the problem lies
within the JDesktop classes, in which case you should
probably 'tell someone that cares' - where that 'someone'
would probably be listenning on the JDesktop forums.

Andrew T.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2737 — Re: JDesktop Web Componen

From"Foreal" <foreal@THRWHITE.remove-dii-this>
Date2011-04-27 15:40 +0000
SubjectRe: JDesktop Web Componen
Message-ID<1194535300.388767.99790@q5g2000prf.googlegroups.com>
In reply to#2732
  To: comp.lang.java.gui
On Nov 7, 4:28 am, Andrew Thompson <andrewtho...@gmail.com> wrote:
> On Nov 7, 8:03 am, Foreal <galtsc...@gmail.com> wrote:
>
> > I have a JTabbedPane with one tab that is a WebBrowsercomponentthat
> > 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: "JDesktopIntegration Components binary has encountered a
> > problem and needs to close.  We are sorry for the inconvenience.".
>
> Sure.  Did you hava a question, or were you just making
> a comment?
>
> If 'asking a question' - you might try adding one in future.
>
> In any case, I recommend the following course of
> action to debug the code.
> 1) Prepare an example that does not involve theJDesktop
> classes and also crashes, and post it here as an SSCCE
> with a question attached.
> 2) If you can prepare an example as decribed in 1) but
> it does *not* crash, that supports that the problem lies
> within theJDesktopclasses, in which case you should
> probably 'tell someone that cares' - where that 'someone'
> would probably be listenning on theJDesktopforums.
>
> Andrew T.

I'm sorry Andrew, but do I need to include a question mark to make my
question more obvious? If so, here are few sample questions that would
have fit: "Has anyone else experienced this?", "Has anyone else fixed
this?", etc. And further, I think it's fairly obvious that I'm only
getting this error with JDIC, otherwise my post would have been more
generic; perhaps something along the lines of "I crash whenever I am
trying to move a tab" would have done fine. Regardless, you did take
the time to respond (albeit with a smart-ass, holier-than-thou
response typical of those who have spent their entire lives talking to
people (or perhaps just machines) on im rather than in person), and
for that I am eternally grateful.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2740 — Re: JDesktop Web Componen

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:40 +0000
SubjectRe: JDesktop Web Componen
Message-ID<7aeeb07861570@uwe>
In reply to#2737
  To: comp.lang.java.gui
Foreal wrote:
>> > I have a JTabbedPane with one tab that is a WebBrowsercomponent
..
>I'm sorry Andrew, but do I need to include a question mark to make my
>question more obvious? If so, here are few sample questions that would
>have fit: "Has anyone else experienced this?", "Has anyone else fixed
>this?", etc. And further, I think it's fairly obvious that I'm only
>getting this error with JDIC, otherwise my post would have been more
>generic; perhaps something along the lines of "I crash whenever I am
>trying to move a tab" would have done fine. Regardless, you did take
>the time to respond (albeit with a smart-ass, holier-than-thou
>response typical of those who have spent their entire lives talking to
>people (or perhaps just machines) on im rather than in person), ...

I note that amongst all that self indulgent whining, there is no
indication you followed either of my suggestions.

>..and
>for that I am eternally grateful.

(shrugs)  'No worries.'

-- 
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/1

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web