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

[macos]Indeterminate JProgressBar does not display animation

    XMLWordPrintable

    Details

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Mac OS Big Sur, Java 8 or 15.1

      A DESCRIPTION OF THE PROBLEM :
      I add an indeterminate JProgressBar to a JFrame. On Mac OS, the progress bar does not show any animation.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a JFrame, add to it a JProgressBar which is indeterminate, display the frame on Mac OS with Java 1.8 or 15.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The JProgressBar should show an indeterminate progress animation.
      ACTUAL -
      The JProgressBar is very thin on the vertical axis and does not display anything.

      ---------- BEGIN SOURCE ----------
        public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
          UIManager.setLookAndFeel(
              UIManager.getSystemLookAndFeelClassName());
          JFrame mainWindow = new JFrame("Progress Bar Test");
          mainWindow.setSize(480, 320);
          
          JPanel mainPanel = new JPanel(new BorderLayout());
          
          JProgressBar progressBar = new JProgressBar();
          progressBar.setString("ABC");
          progressBar.setStringPainted(true);
          progressBar.setIndeterminate(true);
          
          mainPanel.add(progressBar, BorderLayout.CENTER);
          mainWindow.add(mainPanel, BorderLayout.CENTER);
          mainWindow.setVisible(true);
        }
      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

        1. Capture.JPG
          23 kB
          Praveen Narayanaswamy
        2. TestSample.java
          0.9 kB
          Praveen Narayanaswamy

          Activity

            People

            Assignee:
            psadhukhan Prasanta Sadhukhan
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: