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

regression : gtk : Vertical scrollbar tumb is not seen after resizing JTextArea in 6u2 onwards

XMLWordPrintable

      I have a JFrame, which contains a JTextarea. When the frame is resized , i can see scrollbars. but vertical scrollbar tumb is not seen. I typed some lines( 10 ) of character. but still i can't see the scrollbar tumb , when i click on the arrow button ( up or down) the action is performed ie, i can see the lines are moving line up & down. This works fine in jdk6.0 , jdk7.0 & 1.6.0_01-b05. But fails from 1.6.0_02-b05 & 1.6.0_03-ea-b01. Hence its a regression introduced in 1.6.0_02-b05 onwards. I have attached screen shot of the same.


      public class Main extends javax.swing.JFrame {
          private javax.swing.JMenuItem exitItem;
          private javax.swing.JScrollPane jScrollPane1;
          private javax.swing.JTextArea jTextArea1;
          private javax.swing.JMenu menu;
          private javax.swing.JMenuBar menuBar;
          private javax.swing.JMenuItem testItem;

          public Main() {
              initComponents();
          }

          private void initComponents() {
              jScrollPane1 = new javax.swing.JScrollPane();
              jTextArea1 = new javax.swing.JTextArea();
              menuBar = new javax.swing.JMenuBar();
              menu = new javax.swing.JMenu();
              testItem = new javax.swing.JMenuItem();
              exitItem = new javax.swing.JMenuItem();
              setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
              jTextArea1.setColumns(20);
              jTextArea1.setRows(5);
              jScrollPane1.setViewportView(jTextArea1);
              getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
              menu.setMnemonic('f');
              menu.setText("File");
              testItem.setMnemonic('s');
              testItem.setText("Test");
              menu.add(testItem);
              exitItem.setMnemonic('x');
              exitItem.setText("Exit");
              exitItem.addActionListener(new java.awt.event.ActionListener() {
                  public void actionPerformed(java.awt.event.ActionEvent evt) {
                      System.exit(0);
                  }
              });
              menu.add(exitItem);
              menuBar.add(menu);
              setJMenuBar(menuBar);
              pack();
          }

          public static void main(String args[]) {
              java.awt.EventQueue.invokeLater(new Runnable() {
                  public void run() {
                      new Main().setVisible(true);
                  }
              });
          }

      }



      Step to reproduce:
      -----------------
      1) Run the program.
      2) Move the mouse to the right left corner & resize the frame. until you see scrollbar. Observe that vertical scrollbar tumb is missing.
      3) type some characters into the textarea say 10 line.
      4) click on the uparrow of the vertical scrollbar & observe that line are moving up. If you oberve the same then the bug is reproduced.
      This bug is reproduced in blueprint & stell themes.

            stayer Kirill Kirichenko (Inactive)
            lpremkumsunw Lawrence Premkumar1 (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: