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

Scrollbar thumb disappears in Nimbus look and feel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u60, 8u66, 9
    • client-libs
    • x86_64
    • linux_ubuntu

      FULL PRODUCT VERSION :
      java version "1.8.0_60"
      Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
      Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux marvin 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


      A DESCRIPTION OF THE PROBLEM :
      When using Nimbus look and feel, the scrollbar thumb disappears if its size gets below approximately 24 pixels.
       

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Resize any scrollbar so that the thumb becomes small.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The scrollbar thumb should remain visible, at a reasonable minimum size.
      ACTUAL -
      The scrollbar thumb disappears once it reaches approximately 24 pixels.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;

      public class ScrollTest {
          public static void main(String[] args) throws Exception {
              for (UIManager.LookAndFeelInfo info :
      UIManager.getInstalledLookAndFeels()) {
                  if (info.getName().startsWith("Nimbus")) {
                      UIManager.setLookAndFeel(info.getClassName());
                      break;
                  }
              }

              final JFrame frame = new
      JFrame(ScrollTest.class.getSimpleName());
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

              JTextArea textArea = new JTextArea();
              textArea.setColumns(80);
              textArea.setRows(40);
      textArea.setFont(new java.awt.Font("Monospaced", 0, 12));

              final JScrollPane scrollPane = new JScrollPane(textArea);
              scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
              scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
              frame.getContentPane().add(scrollPane);
              frame.pack();
              frame.setVisible(true);
          }
      }

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

            pardesha Pardeep Sharma
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: