Skip to main content

Tooltip display caused JDialog in JApplet to become non-modal

15 replies [Last post]
forcers
Offline
Joined: 2008-01-18

I have an applet with a JDialog.

The JDialog is modal and has the applet as its parent.

One of the controls in the JDialog has a tooltip associated with it. When I mouse over the component with the tooltip, the tooltip attempts to draw, but then the JDialog becomes invisible (i.e., modality ignored).

It does appear that the tooltip wants to paint outside the bounds on the JDialog; this may have something to do with it.

When I click anywhere in the applet or browser, the JDialog appears again.

I tried to find an example in swingset or similar, but had no luck.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
christiaan_se
Offline
Joined: 2006-07-13

Are you sure it is related to the "warning banner" As mentioned I am also experiencing this and I am running a JFrame. I am having random behaviour on this. It might be a coincidence that the last time it worked correctly for you?

Seems quite similar to this old (and unreproducible) bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4131523

walterln
Offline
Joined: 2007-04-17

Some additional info:
It only happens when there is a heavy weight JDIC web browser on screen.
If the problem occurs (dialog vanishes when tool tip window is shown), removing the browser fixes it and when the browser is re-added the problem is back.

We call ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);

I haven't been able to get the problem to occur in a separate test case yet.
Also the dialog stays modal, it is just not painted (for example, alt-tab back to our program reshows the dialog until a tool tip shows).

This is on 6u10 + WinXP sp2. I guess it is related to the accelerated java2d pipeline, but since I can't reproduce the issue on demand, I can't say if -Dsun.java2d.d3d=false removes the problem for sure.

J2D_TRACE_LEVEL=4 output when I start a java program:

[I] OS Version = OS_WINXP Pro
[I] CheckAdaptersInfo
[I] ------------------
[I] Adapter Ordinal : 0
[I] Adapter Handle : 0x10001
[I] Description : NVIDIA GeForce 7300 LE
[I] GDI Name, Driver : \\.\DISPLAY1, nv4_disp.dll
[I] Vendor Id : 0x10de
[I] Device Id : 0x01d1
[I] SubSys Id : 0x35610de
[I] Driver Version : 6.14.10.8265
[I] GUID : {D7B71E3E-4291-11CF-2753-5C2300C2CB35}
[I] D3DPPLM::CheckDeviceCaps: adapter 0: Passed
[I] ------------------
[I] D3DGD_getDeviceCapsNative
[I] D3DContext::InitContext device 0
[I] D3DContext::ConfigureContext device 0
[V] dwBehaviorFlags=D3DCREATE_FPU_PRESERVE|D3DCREATE_HARDWARE_VERTEXPROCESSING
[I] D3DContext::ConfigureContext: successfully created device: 0
[I] D3DContext::InitDevice: device 0
[I] D3DContext::InitDefice: successfully initialized device 0
[V] | CAPS_DEVICE_OK
[V] | CAPS_RT_PLAIN_ALPHA
[V] | CAPS_RT_TEXTURE_ALPHA
[V] | CAPS_RT_TEXTURE_OPAQUE
[V] | CAPS_LCD_SHADER | CAPS_BIOP_SHADER | CAPS_PS20
[V] | CAPS_AA_SHADER
[V] | CAPS_PS30
[V] | CAPS_MULTITEXTURE
[V] | CAPS_TEXNONPOW2
[V] | CAPS_TEXNONSQUARE

ixmal
Offline
Joined: 2004-08-08

Well, it seems we're stumbled with discussion. I don't see a way for us (AWT team) to proceed with this issue until a test (applet or, better, standalone) is provided. With all the tests provided so far, the problem is not reproducible.

demonduck
Offline
Joined: 2008-03-14

> Well, it seems we're stumbled with discussion. I
> don't see a way for us (AWT team) to proceed with
> this issue until a test (applet or, better,
> standalone) is provided. With all the tests provided
> so far, the problem is not reproducible.

I think this thread has split into two topics --
1) Modality with JApplets
2) Non-functioning "Show sandbox warning banner" checkbox in the
control panel.

You can use:

"http://pancyl.com/VSync.htm

To test the Show sandbox warning banner functionality. F1 / ESC -- fullscreen / exit.

anthony_p
Offline
Joined: 2006-07-24

Hi demonduck,

Thanks for providing the test applet. We were actually able to reproduce the issue internally, that's why I already submitted the bug (please see my message above).

What Artem (ixmal) is asking about is to provide us an application (and its source code, of course) that can be used to reproduce the modality issue - we are unable to reproduce it so far, that's why we can't start working on this problem. We look forward to seeing some test case for this issue.

--
best regards,
Anthony

forcers
Offline
Joined: 2008-01-18

Yes, my applet is unsigned.

anthony_p
Offline
Joined: 2006-07-24

Could you please disable displaying the security warning (go to Control Panel -> Java -> Advanced -> Security and uncheck the "Show sandbox warning banner" checkbox. Does this fix the issue? Please try several testing cycles since people report it's not 100% reproducible.

forcers
Offline
Joined: 2008-01-18

Unchecking the "Show sandbox warning banner" checkbox resulted in the tooltip not being displayed at all.

The dialog stayed visible, though.

Oddly, after re-checking the "Show sandbox warning banner" checkbox, the dialog now shows the tooltip and does not disappear.

Here is a link to the sample I made but I could not get it to fail:
http://www.printdesktop.com/IeTabbedCrash/TooltipBug.html
Fir some reason, this test link always shows the caution regardless of the value of "Show sandbox warning banner".

demonduck
Offline
Joined: 2008-03-14

> Unchecking the "Show sandbox warning banner" checkbox
> resulted in the tooltip not being displayed at all.
>
> The dialog stayed visible, though.
>
> Oddly, after re-checking the "Show sandbox warning
> banner" checkbox, the dialog now shows the tooltip
> and does not disappear.
>
> Here is a link to the sample I made but I could not
> get it to fail:
> http://www.printdesktop.com/IeTabbedCrash/TooltipBug.h
> tml
> Fir some reason, this test link always shows the
> caution regardless of the value of "Show sandbox
> warning banner".

And, the Show sandbox warning banner has no effect on anything. The icon
still shows and there's no banner ever.

Don't you people test anything anymore? What happened to your QA department?

anthony_p
Offline
Joined: 2006-07-24

Hi demonduck,

I've just submitted the following bug regarding the non-working control panel option:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6754206

This page should be available in several hours. Thank you for the bug report!

--
best regards,
Anthony

forcers
Offline
Joined: 2008-01-18

I am using java.runtime.version = 1.6.0_10-rc2-b32

I tried to create a test case, but it did not fail.

I will have to do some further investigation I guess.

ixmal
Offline
Joined: 2004-08-08

What is JDK version you're observing this problem? Could you provide a minimal testcase, please?

christiaan_se
Offline
Joined: 2006-07-13

Just to let you know, I am also experiencing the same thing with rc2. Unfortunately I can't reproduce this and the problem doesn't seem to appear consistently. It seems like that our application (not an applet) enters a certain "mode" after which this behaviour appears. Once it is there, it remains for every tooltip on a dialog. I don't think it is related to the fact that the tooltip is drawn outside the dialog bounds.

anthony_p
Offline
Joined: 2006-07-24

I'm just curious: is your applet signed or not? I.e. does it display the security warning (the yellow triangle warning icon) with every top-level window that your applet creates?

christiaan_se
Offline
Joined: 2006-07-13

as mentioned, our application is not an applet, it's a JFrame. Problem was detected running from Eclipse debugger.

kind regards,
Christiaan