package example;
//-*- mode:java; encoding:utf-8 -*-
// vim:set fileencoding=utf-8:
//@homepage@
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;

public final class MainPanel extends JPanel {
    private MainPanel() {
        super(new BorderLayout());
        add(new JScrollPane(new JTextArea()));
        setPreferredSize(new Dimension(320, 240));
    }
    private static JMenu makeSubMenu(String title) {
        JMenu menu = new JMenu(title);
        menu.add("Item 1");
        menu.add("Item 2");
        menu.add("Item 3");
        return menu;
    }
    public static void main(String... args) {
        EventQueue.invokeLater(new Runnable() {
            @Override public void run() {
                createAndShowGUI();
            }
        });
    }
    public static void createAndShowGUI() {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            // BUG? UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
        } catch (ClassNotFoundException | InstantiationException
               | IllegalAccessException | UnsupportedLookAndFeelException ex) {
            ex.printStackTrace();
        }

        JMenuBar menuBar = new JMenuBar();
        menuBar.add(new JMenu("Menu 1")).add(makeSubMenu("SubMenu 1"));
        UIManager.put("Menu.arrowIcon", new ArrowIcon());
        menuBar.add(new JMenu("Menu 2")).add(makeSubMenu("SubMenu 2"));

        JFrame frame = new JFrame("@title@");
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.getContentPane().add(new MainPanel());
        frame.setJMenuBar(menuBar);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    }
}

class ArrowIcon implements Icon {
    @Override public void paintIcon(Component c, Graphics g, int x, int y) {
        Graphics2D g2 = (Graphics2D) g.create();

        if (c instanceof AbstractButton && ((AbstractButton) c).getModel().isSelected()) {
            g2.setPaint(Color.WHITE);
        } else {
            g2.setPaint(Color.GRAY);
        }

        int w = getIconWidth() / 2;
        Path2D p = new Path2D.Double();
        p.moveTo(0, 0);
        p.lineTo(w, w);
        p.lineTo(0, getIconHeight());
        p.closePath();

        g2.translate(x, y);
        g2.fill(p);
        g2.dispose();
    }
    @Override public int getIconWidth() {
        return 8;
    }
    @Override public int getIconHeight() {
        return 8;
    }
}

@@ -539,24 +539,288 @@
 (%22Item 3%22);%0A
+        // // NimbusLookAndFeel%0A        // UIDefaults d = new UIDefaults();%0A        // d.put(%22Menu.arrowIcon%22, new ArrowIcon());%0A        // menu.putClientProperty(%22Nimbus.Overrides%22, d);%0A        // menu.putClientProperty(%22Nimbus.Overrides.InheritDefaults%22, true);%0A
         retu
@@ -828,16 +828,16 @@
 n menu;%0A
-
     %7D%0A  
@@ -1196,12 +1196,43 @@
  // 
-BUG?
+// NimbusLookAndFeel%0A            //
  UIM
@@ -1295,24 +1295,114 @@
 kAndFeel%22);%0A
+            // UIManager.getLookAndFeelDefaults().put(%22Menu.arrowIcon%22, new ArrowIcon());%0A
         %7D ca
@@ -2244,24 +2244,206 @@
 x, int y) %7B%0A
+        // // NimbusLookAndFeel%0A        // Container parent = SwingUtilities.getUnwrappedParent(c);%0A        // if (parent instanceof JMenuBar) %7B%0A        //     return;%0A        // %7D%0A%0A
         Grap
@@ -2475,25 +2475,24 @@
 g.create();%0A
-%0A
         if (

add code for NimbusLookAndFeel as comment