Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6580930
Votes 0
Synopsis Swing Popups should overlap taskbar
Category java:classes_swing
Reported Against
Release Fixed 7(b20), 6u10(b05) (Bug ID:2152564)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 6285881 , 6675802 , 2160179 , 6691503 , 6694823 , 6707909 , 6770457 , 6778495
Submit Date 16-JUL-2007
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();
            }
        });
    }
}
Posted Date : 2007-07-16 13:02:42.0
Work Around
N/A
Evaluation
We should enable heavyWeightPopup to overlap taskbar
Posted Date : 2007-07-16 13:04:50.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang