-
Bug
-
Resolution: Fixed
-
P3
-
6u20, 7, 8, 11, 17, 21, 22, 23
-
b04
-
x86
-
windows
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8335335 | 23.0.1 | Alexey Ivanov | P3 | Resolved | Fixed | b02 |
JDK-8335337 | 21.0.5-oracle | Alexey Ivanov | P3 | Resolved | Fixed | b01 |
JDK-8335679 | 21.0.5 | Matthias Baesken | P3 | Resolved | Fixed | b01 |
java version "1.6.0_20"
ADDITIONAL OS VERSION INFORMATION :
Windows Vista (Microsoft Windows [Version 6.0.6002])
A DESCRIPTION OF THE PROBLEM :
You can use the TAB-key to select the next cell in a JTable. After showing a JFileChooser, selecting the details-view in the JFileChooser and closing the dialog, the TAB-key does not work anymore in the JTable.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- make a frame with a JTable with some rows and columns
- set the frame visible
- select a cell in the table an press the TAB-key
=> the next cell ist selected
- open a JFileChooser by an action
- click on the details-button in the JFileChooser
- close the JFileChooser with OK or Cancel
- select a cell in the table an press the TAB-key
=> the next cell is not beeing selected
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the TAB-key should work after using the details-view in JFileChooser
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
public class MyFrame extends JFrame {
private JPanel jPanelMain = null;
private JScrollPane jScrollPane = null;
private JTable jTable = null;
private JButton jButton = null;
private JPanel jPanelButton = null;
public MyFrame() {
initialize();
}
private void initialize() {
this.setTitle("MyFrame");
this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
this.setContentPane(getJPanelMain());
this.setSize(600, 400);
this.setLocation(600, 300);
}
private JPanel getJPanelMain() {
if (jPanelMain == null) {
jPanelMain = new JPanel();
jPanelMain.setLayout(new BorderLayout());
jPanelMain.add(getJScrollPane(), BorderLayout.CENTER);
jPanelMain.add(getJPanelButton(), BorderLayout.NORTH);
}
return jPanelMain;
}
private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setViewportView(this.getJTable());
}
return jScrollPane;
}
private JTable getJTable() {
if (jTable == null) {
jTable = new JTable();
jTable.setModel(new DefaultTableModel(5, 5));
}
return jTable;
}
private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setText("show JFileChooser...");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
JFileChooser fc = new JFileChooser();
fc.showOpenDialog(MyFrame.this);
}
});
}
return jButton;
}
private JPanel getJPanelButton() {
if (jPanelButton == null) {
jPanelButton = new JPanel();
jPanelButton.setLayout(new FlowLayout());
jPanelButton.add(getJButton(), null);
}
return jPanelButton;
}
public static void main(String[] args) {
new MyFrame().setVisible(true);
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8335335 TAB-key does not work in JTables after selecting details-view in JFileChooser
- Resolved
-
JDK-8335337 TAB-key does not work in JTables after selecting details-view in JFileChooser
- Resolved
-
JDK-8335679 TAB-key does not work in JTables after selecting details-view in JFileChooser
- Resolved
- relates to
-
JDK-8166352 FilePane.createDetailsView() removes JTable TAB, SHIFT-TAB functionality
- Resolved
- links to
-
Commit openjdk/jdk21u-dev/4f822299
-
Commit openjdk/jdk23u/e2db30a5
-
Commit openjdk/jdk/711e7238
-
Review openjdk/jdk/19725
-
Review(master) openjdk/jdk21u-dev/807
-
Review(master) openjdk/jdk23u/6