JDK-6577717 : Textboxes don't work in applets under windows and linux
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0u13
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS:
    linux_redhat_4.0,windows,windows_2000,windows_xp,windows_vista linux_redhat_4.0,windows,windows_2000,windows_xp,windows_vista
  • CPU: generic,x86
  • Submitted: 2007-07-06
  • Updated: 2011-02-16
  • Resolved: 2010-01-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
5.0u14 b02Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Textboxes wont work in applets. They appear but are not clickable or editable.

see comments for details
Same issue reported by a CAP member:

the AWT change is not functioning correct. What happens is, that
 on a new Swing JInternalFrame
all Textarea and Textfield components are not editable, regardless of
their editable setting. They become
 editable not before you first click on a JButton, 
that runs an event
 handler. That will be quite problematic,
if not corrected until the final releas

SUGGESTED FIX --- awt_Component.cpp 2007-07-11 16:41:00.000000000 +0400 *************** *** 2015,2027 **** if (frame) { frame->SynthesizeWmActivate(TRUE); } return mrConsume; } - sm_suppressFocusAndActivation = TRUE; - ::SetFocus(NULL); - sm_suppressFocusAndActivation = FALSE; - sm_focusOwner = GetHWnd(); sm_focusedWindow = toplevelHWnd; --- 2015,2026 ---- if (frame) { frame->SynthesizeWmActivate(TRUE); } + sm_suppressFocusAndActivation = TRUE; + ::SetFocus(NULL); + sm_suppressFocusAndActivation = FALSE; return mrConsume; } sm_focusOwner = GetHWnd(); sm_focusedWindow = toplevelHWnd;

EVALUATION The patch for 6562716 was applied to the JDK5.0u13 master workspace incorrectly: a three lines should be IN the if-statement which checks if we are in the embedded frame or not. Correcting that mistake eliminates both problems observed in this CR and in 6578728. Submitter confirmed that the problem doesn't reproducible on Linux or Solaris.


EVALUATION Non-applet application could also reproduce the defect and according to the stack all threads are still responsive. Key, mouse and focus events are still dispatches. Based on a first glance without code inspection, the problem seem specific for text components only: 1) if even I click on another component, TextField still blink the cursor in it. At the same time, FOCUS_GAIN and FOCUS_LOST has been generated correctly. 2) Pressing BackSpace erases all the content of current Text Component. 3) Text field may hang (the rest application parts are still functioning)