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

Unreadable menu bar with Ambiance theme in GTK L&F

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b47
    • CPU:
      x86
    • OS:
      linux, linux_ubuntu

      Backports

        Description

        Using JDK 6 or 7, run any Swing app with a menu bar, e.g.

        import com.sun.java.swing.plaf.gtk.GTKLookAndFeel;
        import java.awt.event.ActionEvent;
        import java.awt.event.ActionListener;
        import javax.swing.JFrame;
        import javax.swing.JMenu;
        import javax.swing.JMenuBar;
        import javax.swing.JMenuItem;
        import javax.swing.UIManager;
        import javax.swing.WindowConstants;
        public class Demo {
            public static void main(String... args) throws Exception {
                UIManager.setLookAndFeel(new GTKLookAndFeel());
                JMenuItem exitItem = new JMenuItem("Exit");
                exitItem.addActionListener(new ActionListener() {
                    @Override public void actionPerformed(ActionEvent e) {
                        System.exit(0);
                    }
                });
                JMenu fileMenu = new JMenu("File");
                fileMenu.add(exitItem);
                JMenuBar bar = new JMenuBar();
                bar.add(fileMenu);
                JFrame frame = new JFrame("Demo");
                frame.setJMenuBar(bar);
                frame.setBounds(100, 100, 300, 100);
                frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
                frame.setVisible(true);
            }
        }

        in Ubuntu 12.04 using the default Ambiance theme. The menu bar will be visible, but the text ("File") will be in dark grey on black, nearly unreadable. The menu text is only readable when the menu is selected.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                rupashka Pavel Porvatov (Inactive)
                Reporter:
                jglick Jesse Glick (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: