FULL PRODUCT VERSION :
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b22)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b21, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
os x version 10.8.5 build 12F45
A DESCRIPTION OF THE PROBLEM :
The cursor is no longer updating correctly after closing a modal dialog.
REGRESSION. Last worked in version 7u60
ADDITIONAL REGRESSION INFORMATION:
java version "1.7.0_60-ea"
Java(TM) SE Runtime Environment (build 1.7.0_60-ea-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- run the test
- click on the "Open" button
- a confirmation dialog appears, click on one of the option buttons
- make sure your cursor never leaves the main window and hover over the text field and table header
- notice that the cursor no longer changes to a text cursor or resize cursor.
note:
- if the confirmation dialog is closed using "enter" then everything is OK
- if one moves the cursor outside the main window, everything is OK again
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The cursor changes when placing the cursor above the text field or table header.
ACTUAL -
The cursor does not change when placed over the text field or table header.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
/**
* Steps to reproduce:
*
* - run the test
* - click on the "Open" button
* - a confirmation dialog appears, click on one of the option buttons
* - make sure your cursor never leaves the main window and hover over the text field and table header
* - notice that the cursor no longer changes to a text cursor or resize cursor.
*
* note:
* - if the confirmation dialog is closed using "enter" then everything is OK
* - if one moves the cursor outside the main window, everything is OK again
*/
public class CursorTest
{
@SuppressWarnings("serial")
public void run()
{
JTable table = new JTable(2, 5);
JScrollPane scrollableTable = new JScrollPane(table);
JTextField textField = new JTextField();
final JFrame frame = new JFrame();
JButton button = new JButton(new AbstractAction("Open")
{
@Override
public void actionPerformed(ActionEvent e)
{
JOptionPane.showConfirmDialog(frame, "hello");
}
});
Container c = frame.getContentPane();
c.setLayout(new BorderLayout(10, 10));
c.add(textField, BorderLayout.PAGE_START);
c.add(scrollableTable, BorderLayout.CENTER);
c.add(button, BorderLayout.PAGE_END);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(300, 300);
frame.setLocationRelativeTo(null);
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
frame.setVisible(true);
}
public static void main(String[] arguments)
{
SwingUtilities.invokeLater(new Runnable()
{
@Override
public void run()
{
CursorTest test = new CursorTest();
test.run();
}
});
}
}
---------- END SOURCE ----------