JDK-6640082 : toFront() not working properly
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2_05
  • Priority: P2
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-12-11
  • Updated: 2011-01-19
  • Resolved: 2007-12-11
Related Reports
Relates :  
Relates :  
Description
The cu used toFront() method in java.awt.Window for JFrame, and was expecting the frame should display in front, but it is not getting displayed in the front.

Comments
WORK AROUND One possible solution for this problem is to stop using the toFront() method, and use the Window.setAlwaysOnTop() method instead if the application developer really wants the window to be in front of any other windows.
11-12-2007

EVALUATION The toFront() method doesn't guarantee that the window will be brought to the front even when there's no any user activity performed (e.g. see CR 6464656). However, when the user explicitly clicks some another window, it means (s)he explicitly wants to make this another window focused, active, and foreground window. Java can't do nothing about this *explicitly expressed* user's wish. Therefore this CR seems to be not a defect in Java. Note, however, that this issue may be workarounded.
11-12-2007