-
Bug
-
Resolution: Fixed
-
P2
-
1.3.0, 1.3.1_01
-
03
-
x86
-
linux, solaris_2.5.1
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2041943 | 1.4.0 | Naoto Sato | P2 | Resolved | Fixed | beta2 |
Name: dc32491 Date: 03/28/2001
When a text component loses focus while composing, VM hangs.
Run the following code, click one of the two text components, invoke Input Method, type ji, which will be composed to a Japanese kana, click the other component. VM hangs.
Note calling to endComposition in focuse listener does not help.
Test environment:
OS: Redhat Linux 6.2J
IME: Canna w/ Input2
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
/**
* Title: Test case for Composition hanging
*/
public class Frame1 extends JFrame {
JTextArea jTextArea1 = new JTextArea();
JEditorPane jEditorPane1 = new JEditorPane();
public Frame1() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
Frame1 frame1 = new Frame1();
frame1.pack();
frame1.setSize(300,200);
frame1.setVisible(true);
}
private void jbInit() throws Exception {
jTextArea1.setText("jTextArea1");
jEditorPane1.setText("jEditorPane1");
jEditorPane1.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(FocusEvent e) {
jEditorPane1_focusLost(e);
}
});
this.getContentPane().add(jTextArea1, BorderLayout.NORTH);
this.getContentPane().add(jEditorPane1, BorderLayout.CENTER);
}
void jEditorPane1_focusLost(FocusEvent e) {
java.awt.im.InputContext context = null ;
for (Container parent = getParent(); parent != null; parent = parent.getParent()) {
if (parent instanceof Window) {
context = ((Window)parent).getInputContext();
break;
}
}
if (context != null) {
context.endComposition();
}
}
}
(Review ID: 119536)
======================================================================
- backported by
-
JDK-2041943 VM hangs at moving focus out of a text component while composing
- Resolved
- relates to
-
JDK-4472331 Solaris installer wizard (java 1.4 beta_refresh-b67) hangs
- Resolved