src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java
Print this page
@@ -39,10 +39,11 @@
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,11 +266,12 @@
protected void assembleSystemMenu() {
systemPopupMenu = new JPopupMenu();
addSystemMenuItems(systemPopupMenu);
enableActions();
- systemLabel = new JLabel(frame.getFrameIcon()) {
+ @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,10 +303,11 @@
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);