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

[macos11] Big Sur JTabbedPane selected tab text cannot be read

    XMLWordPrintable

    Details

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Mac OS Big Sur

      A DESCRIPTION OF THE PROBLEM :
      If I use a Swing JTabbedPane on Mac OS Big Sur the foreground of the selected tab text is white and the background is also white thus it's very hard to read the tab text.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a JTabbedPane with several tabs inside.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The selected tab text should be easily readable.
      ACTUAL -
      The selected tab text cannot be read easily as it is written with white on a white background.

      ---------- BEGIN SOURCE ----------
        public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
          UIManager.setLookAndFeel(
              UIManager.getSystemLookAndFeelClassName());
          JFrame fr = new JFrame("test");
          fr.setSize(500, 500);
          JTabbedPane tp = new JTabbedPane();
          tp.addTab("AAAA", new JLabel("test"));
          tp.addTab("BBB", new JLabel("test"));
          fr.getContentPane().add(tp);
          fr.setVisible(true);
        }

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

      CUSTOMER SUBMITTED WORKAROUND :
      Force set tab foreground color to black. Like:
      UIManager.put("TabbedPane.foreground", Color.black);

      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: