title: Java JPopupMenu bug
body: <p>Seems like I've found a bug in Java:</p>
  
  <p>I need to create the <code>JFrame</code> with a transparent background and now I need to show the <code>JPopupMenu</code> for some user actions. It works fine when <code>JPopupMenu</code> is housed fully inside a <code>JFrame</code>. But when the <code>JPopupMenu</code> is partly outside the <code>JFrame</code>, no item is visible.</p>
  
  <p><strong>SSCCE:</strong></p>
  
  <pre><code>public class PopupTest {
      public static void main(String[] a) {
          final JFrame frame = new JFrame();
          frame.setSize(500, 500);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
          final JPanel panel = new JPanel(new BorderLayout());
          panel.setBorder(BorderFactory.createLineBorder(Color.RED));
  
          panel.addMouseListener(new MouseAdapter() {
              @Override
              public void mouseClicked(MouseEvent e) {
                  if (e.getButton() == MouseEvent.BUTTON3) {
                      JPopupMenu menu = new JPopupMenu();
                      for (int i = 0 ; i &lt; 10; i++) {
                          menu.add(String.valueOf(i));
                      }
  
                      menu.show(panel, e.getX(), e.getY());
                  }
              }
          });
          frame.setContentPane(panel);
          frame.setUndecorated(true);
          frame.setBackground(new Color(50, 50, 50, 200));
  
          SwingUtilities.invokeLater(new Runnable() {
              @Override
              public void run() {
                  frame.setVisible(true);
              }
          });
      }
  }
  </code></pre>
  
  <p>Does anyone know how to solve this?</p>
  
  <p><strong>PS:</strong> JDK 7u40, Win x64</p>