JDK-5033100 : Java Applet Window: background color
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-04-16
  • Updated: 2004-11-24
  • Resolved: 2004-11-24
Related Reports
Relates :  
Description
Name: gm110360			Date: 04/16/2004


A DESCRIPTION OF THE REQUEST :

For unsigned applets, a pop up window (such as a JDialog) has a footer label
that says "Java Applet Window". I understand that this is a security mechanism
and cannot be easily disabled.

But is it possible that this label have the same background color as the rest
of the window --veither by being able to set a particular property or by it
taking on the background color of the OptionPane/Panel?

JUSTIFICATION :
When we change the color of the Panel/OptionPane, it looks ugly if
the footer Label is of a different color.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The footer label should take on the same color as the OptionPane or Panel or
of it's own defined property.
ACTUAL -
Currently, the footer label has it's own color.

---------- BEGIN SOURCE ----------

*****************  Applet code: *******************************************

public class TestApplet extends JApplet {

    public void init() {
        super.init();
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        }
        catch (Exception e) {
            System.out.println("Exception; " + e.getMessage());
        }

        ColorUIResource c = new ColorUIResource(236, 236, 236);
        UIManager.put("OptionPane.background", c);
        UIManager.put("Panel.background", c);

        JPanel pane = new JPanel();
        setContentPane(pane);
        JOptionPane.showMessageDialog(pane, "Testing!", "", JOptionPane.INFORMATION_MESSAGE);
    }


********************* html code *********************************************
<html>
<body>
<h2>Run TestApplet</h2>
<P>
<applet code="TestApplet.class"
	width=400
	height=50>
</applet>

</body>
</html>


---------- END SOURCE ----------
(Incident Review ID: 229421) 
======================================================================

Comments
WORK AROUND can use policytool to hide this alert by allowing appropriate permissions. ###@###.### 2004-11-24 14:29:06 GMT
24-11-2004

EVALUATION This request sounds reasonable. However, we have to be careful that the foreground and background colors are not the same or similar. ###@###.### 2004-05-13 This is entirely implemented by awt, and still inconsistent betwerr unix and windows (see 4673898) ###@###.### 2004-05-13 Reassign it to AWT for consideration. ###@###.### 2004-11-23 19:35:06 GMT The possibility to change the color (background only) of this label lead to ability to hide this alert string completely with black rectangle. This looks like security issue. As far as I know any window created by an applet should be different from native window. Mentioned alert string is one of them. ###@###.### 2004-11-24 08:50:23 GMT This alert string appears if the applet is not trusted by user: security policy doesn't allow to create applets' Dialogs, Frames, Windows without grey label. Will not fix since this is security necessity. ###@###.### 2004-11-24 14:29:06 GMT
24-11-2004