JDK-4369790 : unix: Cursor disappears in JSplitPane component after the component resizing
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2000-09-11
  • Updated: 2001-01-19
  • Resolved: 2001-01-19
Related Reports
Duplicate :  
Description

Name: iaR10016			Date: 09/11/2000



JDK version:
java version "1.3.0rc1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-b17)
Java HotSpot(TM) Client VM (build 1.3.0rc1-b17, mixed mode)

The following test example demonstrates unexpected JSplitPane component behaviour.
To reproduce the bug please do the following steps:

Enter top JTextArea component and type some text. Then resize tested frame window.
The cursor becomes invnsible after such actions. If you then resize the tested frame
once more, the cursor appears again and then never dissapears.

------------------------- test.java ---------------------------------------------

import java.awt.*;
import javax.swing.*;

public class test extends JFrame {
  public static void main(String[] args) {
    JFrame frame = new test();
    JSplitPane splitPane = new JSplitPane( JSplitPane.VERTICAL_SPLIT, new JTextArea(), new JButton("I'm Button") );
    splitPane.setDividerLocation(200);
    splitPane.setPreferredSize(new Dimension(500, 300));
    frame.getContentPane().add(splitPane, BorderLayout.CENTER);
    frame.pack();
    frame.setVisible(true);
   }
}

---------------------------------------------------------------------------------

Please note that this efect is present only for the JSplitPane component. For example,
the following code demonstrates correct cursor behaviour:

------------------------- test1.java --------------------------------------------

import java.awt.*;
import javax.swing.*;

public class test1 extends JFrame {
  public test1() {
    super("JTextArea test");
    getContentPane().add(new JTextArea());
   }
  public static void main(String[] args) {
    JFrame frame = new test1();
    frame.setSize(new Dimension(500, 300));
    frame.setVisible(true);
   }
}

---------------------------------------------------------------------------------

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

Comments
EVALUATION This was fixed with the focus rearchitecting (bug 4290675). I believe what was happening was a focusLost was being sent without a subsequent focusGained when the focus was gained again. Hence you could still type, but the cursor wasn't visible. scott.violet@eng 2001-01-19
19-01-2001