src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java

Print this page

        

*** 39,48 **** --- 39,49 ---- import java.beans.PropertyVetoException; import static com.sun.java.swing.plaf.windows.TMSchema.*; import static com.sun.java.swing.plaf.windows.XPStyle.Skin; + @SuppressWarnings("serial") // Superclass is not serializable across versions public class WindowsInternalFrameTitlePane extends BasicInternalFrameTitlePane { private Color selectedTitleGradientColor; private Color notSelectedTitleGradientColor; private JPopupMenu systemPopupMenu; private JLabel systemLabel;
*** 265,275 **** protected void assembleSystemMenu() { systemPopupMenu = new JPopupMenu(); addSystemMenuItems(systemPopupMenu); enableActions(); ! systemLabel = new JLabel(frame.getFrameIcon()) { protected void paintComponent(Graphics g) { int x = 0; int y = 0; int w = getWidth(); int h = getHeight(); --- 266,277 ---- protected void assembleSystemMenu() { systemPopupMenu = new JPopupMenu(); addSystemMenuItems(systemPopupMenu); enableActions(); ! @SuppressWarnings("serial") // anonymous class ! JLabel tmp = new JLabel(frame.getFrameIcon()) { protected void paintComponent(Graphics g) { int x = 0; int y = 0; int w = getWidth(); int h = getHeight();
*** 301,310 **** --- 303,313 ---- icon.paintIcon(this, g, 0, 0); } g.dispose(); } }; + systemLabel = tmp; systemLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 && frame.isClosable() && !frame.isIcon()) { systemPopupMenu.setVisible(false);