JDK-6580930 : Swing Popups should overlap taskbar
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-07-16
  • Updated: 2015-03-17
  • Resolved: 2007-09-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u10Fixed 7 b20Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
In native applications for Windows, if a popup is big enough 
it can overlap the taskbar (see the image attached)
the same behaiviour can be seen for GTK on *nix

Swing doesn't allow popups to overlap taskbar
and it prevents Swing applications from looking native
and the most important it doesn't allow to implement
the JTrayIcon to use JPopupMenu together with awt.TrayIcon

Use the simple test to see that popup doesn't overlap taskbar:

import javax.swing.*;

public class PopupTest {

    private static void createGui() {
        final JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JPopupMenu menu = new JPopupMenu("Menu");
        menu.add(new JMenuItem("MenuItem"));
        menu.add(new JMenuItem("MenuItem"));
        menu.add(new JMenuItem("MenuItem"));
        menu.add(new JMenuItem("MenuItem"));
        menu.add(new JMenuItem("MenuItem"));
        menu.add(new JMenuItem("MenuItem"));
        menu.add(new JMenuItem("MenuItem"));
        menu.add(new JMenuItem("MenuItem"));
        menu.add(new JMenuItem("MenuItem"));

        JPanel panel = new JPanel();
        panel.setComponentPopupMenu(menu);
        frame.add(panel);

        frame.setSize(200, 200);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    }

    public static void main(String[] args) throws Exception {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                PopupTest.createGui();
            }
        });
    }
}

Comments
EVALUATION We should enable heavyWeightPopup to overlap taskbar
16-07-2007