Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4718813
Votes 0
Synopsis Application Manager lost focus after first startup
Category javawebstart:app_mgr
Reported Against 1.0.1_02
Release Fixed 1.4.2(mantis)
State 10-Fix Delivered, Verified, bug
Priority: 4-Low
Related Bugs 4722671
Submit Date 23-JUL-2002
Description
I am not sure if this is actually a AWT regression since 1.4, or JWS
bug.

I need JWS developer's review and support for generating a demo case if
it's a AWT bug.

This happens in our automation development work and, general user will 
rarely meet this.

It happens on Windows platform.

To reproduce the bug, on a clean machine without any JRE/JDK/JWS installed,
install latest Hopper build (or Merlin fcs JRE). In Hopper JRE, JWS version
is 1.2, in Merlin FCS, JWS version is 1.0.1_02. This doesn't matter.

Step to reproduce:
1. Install JRE, using default configuration.
2. After installation, close other running application window.
3. double click the Java Web Start Icon on the desktop.
4. After double click the icon, don't move the mouse, just wait the
   Java Web Start application manager to show up and wait all the icons
   inside the panel to be updated. It might take a while.
5. After JWS has downloaded all the resources from the demo site and
   no more activity is going, the application manager window has
   the focus, but, if you press Alt+F4 to close it, or press Alt+F to
   open file menu. It won't work.

It takes some trial and error to reproduce the bug. Using Hopper, I can
reproduce it 1 out of 4 times, using Merlin, I can reproduce it 1 out of
9 times. I can't reproduce it using 1.3.1_02.

Here are some evaluation.

Initially I tried to explain the behavior in this:
The Java Web Start shortcut is pointing to javaws.exe file, which subsequently
launch a Java program (Application manager) and die silently. So the focus
is on that javaws.exe file and, when it dies, the focus is going to nowhere.
That's why Application manager does not has input focus.

However, If you try to launch an application, then close it. Now there is
something in the cache. Now repeat abve 4 and 5 steps, you will always get
the focus in Application manager.

I think there might be some race condition happening after the initial
launching of the Java Web Start.

It's taking me quite a long time to get a thread dump. See the comments
part.

Instead of launching from javaws.exe, I tried to launch javaws.jar file
directly, which you know how to do that.

The trick is if you type the command in a Windows prompt, or run a bat file
in a windows prompt, you can't reproduce the bug. The reason might be the
opening Windows prompt window helped something in focus. You should create
a shortcut to the bat file used to launch javaws.jar file. Then, when no
other application window running, double click the shortcut on the desktop.


  xxxxx@xxxxx   2002-07-22
Work Around
N/A
Evaluation
I think the problem can be fixed by adding one line in Player.java, method 
finishedLoadingImage:

  private void finishedLoadingImage(IconDesc id, Image image) {
        _imageMap.put(id, image);
        getCurrentManager().setSelectedIndex(0);

        // fix for 4718813: Application Manager lost focus after first startup
	_iconList.requestDefaultFocus();

        updateUI(true);
    }

I cannot reproduce the problem anymore after that line is added.

But since this is not a blocking bug, Andy said we should investigate further to 
find out what's the underlying problem.

I will continue to investigate on it and see I can find out more information.

  xxxxx@xxxxx   2002-07-24
-------------------------
this is a regression in awt from 1.4.0 to 1.4.1-rc
see also 4722671

  xxxxx@xxxxx   2002-07-30
---------------------------- 

I discussed this briefly with   xxxxx@xxxxx   today, and he thought it 
probably would not be a showstopper for Hopper.  I'll commit it to Mantis.   
  xxxxx@xxxxx   2002-07-30





Below are stack traces of focus requests performed during JWS start. It can be seen
from them that due to some uknown reason in good case JWS causes AWT to request focus
on JButton("Less Detail") while in bad case the focus remains on Player$27 which is
JLabel inside IconList. It is the state which looks like there is no focus owner - 
there is one,
it is JLabel and it is component on which JWS requested focus so everything looks 
correct
from AWT perspective. The only question is why we have two cases?

What is going on:
all this happens inside of IconList.setList method.
First, JWS calls removeAll() on JList. This causes JList to transfer focus to another
component if it contained focus owner.
After that, JWS adds a number of labels with icons into JList, and (if current focus 
owner in iconPanel is null)  requests focus on one of the labels. 

At that time, if first request has been already processed, current focus owner is 
JButton in buttonPanel - so, for _iconPanel it is null and it doesn't request focus 
and program ends with JButton as focus owner - this is good case.

If that request has not been processed then iconPanel has focus owner and JWS request
focus on label - which makes application to look like there is no focus owner.

Remaining questions to JWS:
- why do you check iconPanel for focus owner and then request focus on newly 
  created label?
- why do you request focus on label?
Currently, I don't see the reason to keep this bug on AWT, recategorizing.
  xxxxx@xxxxx   2002-07-31

======================================================================




"Bad" case:
Java Web Start 1.2-rc Console, started Wed Jul 31 19:58:29 MSD 2002
Java 2 Runtime Environment: Version 1.4.1-internal by Sun Microsystems Inc.
Logging to file: d:\mantis\webstart.log
>>> java.awt.event.WindowEvent[WINDOW_CLOSED,opposite=null,oldState=0,newState=0] on 
frame0
>>> java.awt.event.WindowEvent[WINDOW_GAINED_FOCUS,opposite=null,oldState=0,newState=0] 
on frame1
>>> java.awt.event.WindowEvent[WINDOW_ACTIVATED,opposite=null,oldState=0,newState=0] on 
frame1
>>> First request null
>>> Requesting: null
    Default:    
com.sun.javaws.ui.player.Player$IconList[,0,0,361x82,layout=com.sun.javaws.ui.player.Pl
ayer$IconGridLayout,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,s
electionBackground=javax.swing.plaf.ColorUIResource[r=204,g=204,b=255],selectionForegro
und=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],visibleRowCount=8,layoutOrientation=0
]
    Pressed:    null
>>> Requesting focus on 
com.sun.javaws.ui.player.Player$IconList[,0,0,361x82,layout=com.sun.javaws.ui.player.Pl
ayer$IconGridLayout,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,s
electionBackground=javax.swing.plaf.ColorUIResource[r=204,g=204,b=255],selectionForegro
und=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],visibleRowCount=8,layoutOrientation=0
]
java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1071)
	at java.awt.Component.requestFocusHelper(Component.java:6078)
	at java.awt.Component.requestFocusInWindow(Component.java:6023)
	at javax.swing.JComponent.requestFocusInWindow(JComponent.java:1142)
	at 
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:300
)
	at java.awt.Component.dispatchEventImpl(Component.java:3468)
	at java.awt.Container.dispatchEventImpl(Container.java:1624)
	at java.awt.Window.dispatchEventImpl(Window.java:1588)
	at java.awt.Component.dispatchEvent(Component.java:3439)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
	at java.awt.SequencedEvent.dispatch(SequencedEvent.java:91)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
>>> java.awt.event.WindowEvent[WINDOW_OPENED,opposite=null,oldState=0,newState=0] on 
frame1
>>> java.awt.event.FocusEvent[FOCUS_GAINED,permanent,opposite=null] on frame1
>>> Requesting focus on 
com.sun.javaws.ui.player.Player$27[,0,0,0x0,invalid,defaultIcon=com.sun.javaws.ui.playe
r.Player$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADING,horizontalTex
tPosition=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER]
java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1071)
	at java.awt.Component.requestFocusHelper(Component.java:6078)
	at java.awt.Component.requestFocus(Component.java:5932)
	at javax.swing.JComponent.requestFocus(JComponent.java:1110)
	at com.sun.javaws.ui.player.Player$IconList.setList(Unknown Source)
	at com.sun.javaws.ui.player.Player.updateUI(Unknown Source)
	at com.sun.javaws.ui.player.Player.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.ui.player.Player.access$0(Unknown Source)
	at com.sun.javaws.ui.player.Player$2.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.cache.CacheImageLoader$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
>>> Requesting focus on 
com.sun.javaws.ui.player.Player$27[,0,0,0x0,invalid,defaultIcon=com.sun.javaws.ui.playe
r.Player$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADING,horizontalTe
xtPosition=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER]
java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1071)
	at java.awt.Component.requestFocusHelper(Component.java:6078)
	at java.awt.Component.requestFocus(Component.java:5932)
	at javax.swing.JComponent.requestFocus(JComponent.java:1110)
	at com.sun.javaws.ui.player.Player$IconList.setList(Unknown Source)
	at com.sun.javaws.ui.player.Player.updateUI(Unknown Source)
	at com.sun.javaws.ui.player.Player.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.ui.player.Player.access$0(Unknown Source)
	at com.sun.javaws.ui.player.Player$2.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.cache.CacheImageLoader$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
>>> Requesting focus on 
com.sun.javaws.ui.player.Player$27[,0,0,0x0,invalid,defaultIcon=com.sun.javaws.ui.playe
r.Player$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADING,horizontalTex
tPosition=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER]
java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1071)
	at java.awt.Component.requestFocusHelper(Component.java:6078)
	at java.awt.Component.requestFocus(Component.java:5932)
	at javax.swing.JComponent.requestFocus(JComponent.java:1110)
	at com.sun.javaws.ui.player.Player$IconList.setList(Unknown Source)
	at com.sun.javaws.ui.player.Player.updateUI(Unknown Source)
	at com.sun.javaws.ui.player.Player.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.ui.player.Player.access$0(Unknown Source)
	at com.sun.javaws.ui.player.Player$2.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.cache.CacheImageLoader$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
>>> Requesting focus on 
com.sun.javaws.ui.player.Player$27[,0,0,0x0,invalid,defaultIcon=com.sun.javaws.ui.playe
r.Player$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADING,horizontalTex
tPosition=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER]
java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1071)
	at java.awt.Component.requestFocusHelper(Component.java:6078)
	at java.awt.Component.requestFocus(Component.java:5932)
	at javax.swing.JComponent.requestFocus(JComponent.java:1110)
	at com.sun.javaws.ui.player.Player$IconList.setList(Unknown Source)
	at com.sun.javaws.ui.player.Player.updateUI(Unknown Source)
	at com.sun.javaws.ui.player.Player.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.ui.player.Player.access$0(Unknown Source)
	at com.sun.javaws.ui.player.Player$2.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.cache.CacheImageLoader$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
>>> 
java.awt.event.FocusEvent[FOCUS_LOST,permanent,opposite=com.sun.javaws.ui.player.Player
$27[,0,0,180x41,defaultIcon=com.sun.javaws.ui.player.Player$  xxxxx@xxxxx  ,disa
bledIcon=,horizontalAlignment=LEADING,horizontalTextPosition=TRAILING,iconTextGap=4,lab
elFor=,text=Draw 4,verticalAlignment=CENTER,verticalTextPosition=CENTER]] on 
com.sun.javaws.ui.player.Player$IconList[,0,0,361x82,layout=com.sun.javaws.ui.player.Pl
ayer$IconGridLayout,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,s
electionBackground=javax.swing.plaf.ColorUIResource[r=204,g=204,b=255],selectionForegro
und=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],visibleRowCount=8,layoutOrientation=0
]
HeavyweightFocusRequest[heavweight=javax.swing.JFrame[frame1,1043,183,400x347,invalid,l
ayout=java.awt.BorderLayout,title=Java Web Start Application 
Manager,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRoot
Pane[,4,23,392x320,layout=javax.swing.JRootPane$RootLayout],rootPaneCheckingEnabled=tru
e],lightweightRequests=[LightweightFocusRequest[component=com.sun.javaws.ui.player.Play
er$27[,0,0,180x41,defaultIcon=com.sun.javaws.ui.player.Player$  xxxxx@xxxxx  ,di
sabledIcon=,horizontalAlignment=LEADING,horizontalTextPosition=TRAILING,iconTextGap=4,l
abelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER],temporary=false],LightweightFoc
usRequest[component=com.sun.javaws.ui.player.Player$27[,0,0,180x41,defaultIcon=com.sun.
javaws.ui.player.Player$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADI
NG,horizontalTextPosition=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER],temporary=false],LightweightFoc
usRequest[component=com.sun.javaws.ui.player.Player$27[,0,0,180x41,defaultIcon=com.sun.
javaws.ui.player.Player$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADIN
G,horizontalTextPosition=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER],temporary=false],LightweightFoc
usRequest[component=com.sun.javaws.ui.player.Player$27[,0,0,180x41,defaultIcon=com.sun.
javaws.ui.player.Player$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADIN
G,horizontalTextPosition=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER],temporary=false]]]
>>> Removing 
HeavyweightFocusRequest[heavweight=javax.swing.JFrame[frame1,1043,183,400x347,invalid,l
ayout=java.awt.BorderLayout,title=Java Web Start Application 
Manager,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRoot
Pane[,4,23,392x320,layout=javax.swing.JRootPane$RootLayout],rootPaneCheckingEnabled=tru
e],lightweightRequests=[LightweightFocusRequest[component=com.sun.javaws.ui.player.Play
er$27[,0,0,180x41,defaultIcon=com.sun.javaws.ui.player.Player$  xxxxx@xxxxx  ,di
sabledIcon=,horizontalAlignment=LEADING,horizontalTextPosition=TRAILING,iconTextGap=4,l
abelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER],temporary=false],LightweightFoc
usRequest[component=com.sun.javaws.ui.player.Player$27[,0,0,180x41,defaultIcon=com.sun.
javaws.ui.player.Player$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADI
NG,horizontalTextPosition=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER],temporary=false],LightweightFoc
usRequest[component=com.sun.javaws.ui.player.Player$27[,0,0,180x41,defaultIcon=com.sun.
javaws.ui.player.Player$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADIN
G,horizontalTextPosition=TRAILING,iconTextGap=
4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER],temporary=false],LightweightFoc
usRequest[component=com.sun.javaws.ui.player.Player$27[,0,0,180x41,defaultIcon=com.sun.
javaws.ui.player.Player$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADIN
G,horizontalTextPosition=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER],temporary=false]]]
>>> 
java.awt.event.FocusEvent[FOCUS_GAINED,permanent,opposite=com.sun.javaws.ui.player.Play
er$IconList[,0,0,361x82,layout=com.sun.javaws.ui.player.Player$IconGridLayout,fixedCell
Height=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectionBackground=javax.swin
g.plaf.ColorUIResource[r=204,g=204,b=255],selectionForeground=javax.swing.plaf.ColorUIR
esource[r=0,g=0,b=0],visibleRowCount=8,layoutOrientation=0]] on 
com.sun.javaws.ui.player.Player$27[,0,0,180x41,defaultIcon=com.sun.javaws.ui.player.Pla
yer$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADING,horizontalTextPosi
tion=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER]
>>> ^^^ Bad event ^^^: null
>>> Current owner: 
com.sun.javaws.ui.player.Player$27[,0,0,180x41,defaultIcon=com.sun.javaws.ui.player.Pla
yer$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADING,horizontalTextPosi
tion=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER]
>>> Current owner: 
com.sun.javaws.ui.player.Player$27[,0,0,180x41,defaultIcon=com.sun.javaws.ui.player.Pla
yer$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADING,horizontalTextPosi
tion=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER]
>>> Current owner: 
com.sun.javaws.ui.player.Player$27[,0,0,180x41,defaultIcon=com.sun.javaws.ui.player.Pla
yer$  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADING,horizontalTextPosi
tion=TRAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER]
>>> java.awt.event.WindowEvent[WINDOW_CLOSING,opposite=null,oldState=0,newState=0] on 
frame1
  xxxxx@xxxxx   2002-07-31

======================================================================




Good case:
Java Web Start 1.2-rc Console, started Wed Jul 31 20:20:01 MSD 2002
Java 2 Runtime Environment: Version 1.4.1-internal by Sun Microsystems Inc.
Logging to file: d:\mantis\webstart.log
>>> java.awt.event.WindowEvent[WINDOW_CLOSED,opposite=null,oldState=0,newState=0] on 
frame0
>>> java.awt.event.WindowEvent[WINDOW_GAINED_FOCUS,opposite=null,oldState=0,newState=0] 
on frame1
>>> java.awt.event.WindowEvent[WINDOW_ACTIVATED,opposite=null,oldState=0,newState=0] on 
frame1
>>> First request null
>>> Requesting: null
    Default:    
com.sun.javaws.ui.player.Player$IconList[null,layout=com.sun.javaws.ui.player.Player$Ic
onGridLayout,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectio
nBackground=javax.swing.plaf.ColorUIResource[r=204,g=204,b=255],selectionForeground=jav
ax.swing.plaf.ColorUIResource[r=0,g=0,b=0],visibleRowCount=8,layoutOrientation=0]
    Pressed:    null
>>> Requesting focus on 
com.sun.javaws.ui.player.Player$IconList[null,layout=com.sun.javaws.ui.player.Player$Ic
onGridLayout,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectio
nBackground=javax.swing.plaf.ColorUIResource[r=204,g=204,b=255],selectionForeground=jav
ax.swing.plaf.ColorUIResource[r=0,g=0,b=0],visibleRowCount=8,layoutOrientation=0]
java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1071)
	at java.awt.Component.requestFocusHelper(Component.java:6081)
	at java.awt.Component.requestFocusInWindow(Component.java:6023)
	at javax.swing.JComponent.requestFocusInWindow(JComponent.java:1142)
	at 
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:300
)
	at java.awt.Component.dispatchEventImpl(Component.java:3468)
	at java.awt.Container.dispatchEventImpl(Container.java:1624)
	at java.awt.Window.dispatchEventImpl(Window.java:1588)
	at java.awt.Component.dispatchEvent(Component.java:3439)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
	at java.awt.SequencedEvent.dispatch(SequencedEvent.java:91)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
>>> java.awt.event.WindowEvent[WINDOW_OPENED,opposite=null,oldState=0,newState=0] on 
frame1
>>> java.awt.event.FocusEvent[FOCUS_GAINED,permanent,opposite=null] on frame1
>>> Requesting focus on 
com.sun.javaws.ui.player.Player$27[null,defaultIcon=com.sun.javaws.ui.player.Player$Sca
  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADING,horizontalTextPosition=T
RAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER]
    Parent class javax.swing.JLabel
java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1071)
	at java.awt.Component.requestFocusHelper(Component.java:6081)
	at java.awt.Component.requestFocus(Component.java:5932)
	at javax.swing.JComponent.requestFocus(JComponent.java:1110)
	at com.sun.javaws.ui.player.Player$IconList.setList(Unknown Source)
	at com.sun.javaws.ui.player.Player.updateUI(Unknown Source)
	at com.sun.javaws.ui.player.Player.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.ui.player.Player.access$0(Unknown Source)
	at com.sun.javaws.ui.player.Player$2.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.cache.CacheImageLoader$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
>>> 
java.awt.event.FocusEvent[FOCUS_LOST,permanent,opposite=com.sun.javaws.ui.player.Player
$27[null,defaultIcon=com.sun.javaws.ui.player.Player$  xxxxx@xxxxx  ,disabledIc
on=,horizontalAlignment=LEADING,horizontalTextPosition=TRAILING,iconTextGap=4,labelFor=
,text=Draw 4,verticalAlignment=CENTER,verticalTextPosition=CENTER]] on 
com.sun.javaws.ui.player.Player$IconList[null,layout=com.sun.javaws.ui.player.Player$Ic
onGridLayout,fixedCellHeight=-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectio
nBackground=javax.swing.plaf.ColorUIResource[r=204,g=204,b=255],selectionForeground=jav
ax.swing.plaf.ColorUIResource[r=0,g=0,b=0],visibleRowCount=8,layoutOrientation=0]
>>> 
java.awt.event.FocusEvent[FOCUS_GAINED,permanent,opposite=com.sun.javaws.ui.player.Play
er$IconList[null,layout=com.sun.javaws.ui.player.Player$IconGridLayout,fixedCellHeight=
-1,fixedCellWidth=-1,horizontalScrollIncrement=-1,selectionBackground=javax.swing.plaf.
ColorUIResource[r=204,g=204,b=255],selectionForeground=javax.swing.plaf.ColorUIResource
[r=0,g=0,b=0],visibleRowCount=8,layoutOrientation=0]] on 
com.sun.javaws.ui.player.Player$27[null,defaultIcon=com.sun.javaws.ui.player.Player$Sca
  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADING,horizontalTextPosition=T
RAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER]
>>> Requesting focus on 
javax.swing.JButton[null,layout=javax.swing.OverlayLayout,defaultIcon=javax.swing.Image
  xxxxx@xxxxx  ,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResourc
e[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rollov
erEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Less 
Detail,defaultCapable=true]
java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1071)
	at java.awt.Component.requestFocusHelper(Component.java:6081)
	at java.awt.Component.requestFocus(Component.java:5982)
	at javax.swing.JComponent.requestFocus(JComponent.java:1136)
	at java.awt.Component.nextFocusHelper(Component.java:6237)
	at java.awt.Container.nextFocusHelper(Container.java:2434)
	at java.awt.Component.removeNotify(Component.java:5506)
	at java.awt.Container.removeNotify(Container.java:2070)
	at javax.swing.JComponent.removeNotify(JComponent.java:4299)
	at java.awt.Container.removeAll(Container.java:791)
	at com.sun.javaws.ui.player.Player$IconList.setList(Unknown Source)
	at com.sun.javaws.ui.player.Player.updateUI(Unknown Source)
	at com.sun.javaws.ui.player.Player.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.ui.player.Player.access$0(Unknown Source)
	at com.sun.javaws.ui.player.Player$2.finishedLoadingImage(Unknown Source)
	at com.sun.javaws.cache.CacheImageLoader$1.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
>>> 
java.awt.event.FocusEvent[FOCUS_LOST,permanent,opposite=javax.swing.JButton[null,layout
=javax.swing.OverlayLayout,defaultIcon=  xxxxx@xxxxx  ,disabledIcon=,disab
ledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,right=
14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=false,rolloverIcon=,r
olloverSelectedIcon=,selectedIcon=,text=Less Detail,defaultCapable=true]] on 
com.sun.javaws.ui.player.Player$27[null,defaultIcon=com.sun.javaws.ui.player.Player$Sca
  xxxxx@xxxxx  ,disabledIcon=,horizontalAlignment=LEADING,horizontalTextPosition=T
RAILING,iconTextGap=4,labelFor=,text=Draw 
4,verticalAlignment=CENTER,verticalTextPosition=CENTER]
>>> 
java.awt.event.FocusEvent[FOCUS_GAINED,permanent,opposite=com.sun.javaws.ui.player.Play
er$27[null,defaultIcon=com.sun.javaws.ui.player.Player$  xxxxx@xxxxx  ,disabled
Icon=,horizontalAlignment=LEADING,horizontalTextPosition=TRAILING,iconTextGap=4,labelFo
r=,text=Draw 4,verticalAlignment=CENTER,verticalTextPosition=CENTER]] on 
javax.swing.JButton[null,layout=javax.swing.OverlayLayout,defaultIcon=javax.swing.Image
  xxxxx@xxxxx  ,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResourc
e[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rollov
erEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Less 
Detail,defaultCapable=true]
>>> java.awt.event.WindowEvent[WINDOW_CLOSING,opposite=null,oldState=0,newState=0] on 
frame1
  xxxxx@xxxxx   2002-07-31

======================================================================
the java web start problem can be addressed by removing excess focus requests in
Application Manager.
  xxxxx@xxxxx   2002-08-16
Posted Date : 2005-07-22 03:26:27.0
Comments
  
  Include a link with my name & email   

Submitted On 09-JUN-2004
Java.Ganesh
How to set the focus on JDialog if Focus is  out of java ?
When I press a button , one media Player will be opened along with a JDialog window .
I want the focus on JDialog But the focus is on Media Player 


pls discard the previous message


Submitted On 09-JUN-2004
Java.Ganesh
How to set the focus on JDialog if Focus in out of java ?
When I press a button , one media Player will be opened along with a JDialog window .
I want the focus on JDialog But the focus is on Media Player 



PLEASE NOTE: JDK6 is formerly known as Project Mustang