Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4709394

1.4 REGRESSION: JTable does not take entered data.

    Details

    • Subcomponent:
    • Resolved In Build:
      rc
    • CPU:
      x86
    • OS:
      windows_98, windows_2000

      Description



      Name: gm110360 Date: 06/27/2002


      FULL PRODUCT VERSION :
      java version "1.4.1-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
      Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)



      A DESCRIPTION OF THE PROBLEM :
      JTable does not takes keyboard entered value when clicking on
      other component after input.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1.Click on the first table cell
      2.Enter "abc"
      3.Click on button "jButton1"
      4.The value "abc" disappear from the table.

      Note that after step 2, click on other cell of the table,
      and the value "abc" will be "accepted" into the table.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      The table should takes the value and no enter key or
      anything is needed for this.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      /*
       * TableTest.java
       *
       * Created on June 27, 2002, 5:10 PM
       */

      /**
       *
       * @author vy2
       */
      public class TableTest extends javax.swing.JFrame {

          /** Creates new form TableTest */
          public TableTest() {
              initComponents();
          }

          /** This method is called from within the constructor to
           * initialize the form.
           * WARNING: Do NOT modify this code. The content of this method is
           * always regenerated by the Form Editor.
           */
          private void initComponents() {
              jScrollPane1 = new javax.swing.JScrollPane();
              jTable1 = new javax.swing.JTable();
              jButton1 = new javax.swing.JButton();
              
              getContentPane().setLayout(null);
              
              addWindowListener(new java.awt.event.WindowAdapter() {
                  public void windowClosing(java.awt.event.WindowEvent evt) {
                      exitForm(evt);
                  }
              });
              
              jTable1.setModel(new javax.swing.table.DefaultTableModel(
              new Object [][] {
                  {null},
                  {null},
                  {null},
                  {null}
              },
              new String [] {
                  "Title 1"
              }
              ) {
                  Class[] types = new Class [] {
                      java.lang.Object.class
                  };
                  
                  public Class getColumnClass(int columnIndex) {
                      return types [columnIndex];
                  }
              });
              jScrollPane1.setViewportView(jTable1);
              
              getContentPane().add(jScrollPane1);
              jScrollPane1.setBounds(30, 20, 475, 210);
              
              jButton1.setText("jButton1");
              getContentPane().add(jButton1);
              jButton1.setBounds(70, 275, 81, 26);
              
              pack();
              java.awt.Dimension screenSize =
      java.awt.Toolkit.getDefaultToolkit().getScreenSize();
              setSize(new java.awt.Dimension(800, 600));
              setLocation((screenSize.width-800)/2,(screenSize.height-600)/2);
          }

          /** Exit the Application */
          private void exitForm(java.awt.event.WindowEvent evt) {
              System.exit(0);
          }

          /**
          * @param args the command line arguments
          */
          public static void main(String args[]) {
              new TableTest().show();
          }


          // Variables declaration - do not modify
          private javax.swing.JScrollPane jScrollPane1;
          private javax.swing.JTable jTable1;
          private javax.swing.JButton jButton1;
          // End of variables declaration

      }

      ---------- END SOURCE ----------

      CUSTOMER WORKAROUND :
      Press enter after enter the value, or click inside the table.

      Release Regression From : 1.3.1_03
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Review ID: 158595)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shickeysunw Shannon Hickey (Inactive)
                Reporter:
                gmanwanisunw Girish Manwani (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: