Mac awt regression? (was JDK-8017189: [macosx]Step9: After openning the "File" menu, the items are disabled; regression since b94)

Weijun Wang at
Mon Jun 24 22:39:52 PDT 2013

Hi All

Sorry to write in HTML. I need to add a table.

The bug is about after several clicks on policytool a menu item is
disabled. I've simplified the tool to a small program (attached) with
the same behavior. Running the program in JDK 7 and 8 on Mac shows these

	JDK 7
	JDK 8
Start the app 	New in File menu is enabled
	New in File menu is enabled (same as JDK 7)
Click button one, dialog one pops up
	File menu disappears
	New in File menu is disabled
Click button two, dialog two pops up
	File menu disappears
Close dialog two
	No change
Close dialog one
	File menu reappear with New enabled
	File menu reappears, but New still disabled
Command+Q to quite the app

Is this a regression?

-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
import java.awt.*;
import java.awt.event.*;

public class A2 {

    public static void main(String args[]) {
        ToolWindow tw = new ToolWindow();

class ToolWindow extends Frame {
    void displayToolWindow() {

        setBounds(135, 80, 500, 500);

        MenuBar menuBar = new MenuBar();
        Menu menu = new Menu("File");

        Button button = new Button("One");
        button.addActionListener(new MainWindowListener(this));


class ToolDialog extends Dialog {
    ToolWindow tw;

    ToolDialog(String title, ToolWindow tw) {
        super(tw, true);
        setTitle(title); = tw;
        addWindowListener(new ChildWindowListener(this));

    void displayPolicyEntryDialog(boolean edit) {

        Point location = tw.getLocationOnScreen();
        setBounds(location.x + 75, location.y + 200, 650, 500);

        Button button = new Button("Add Two");
        button.addActionListener(new AddPrinButtonListener(this));

    void displayPrincipalDialog() {
        ToolDialog newTD = new ToolDialog("Two", tw);
        Point location = getLocationOnScreen();
        newTD.setBounds(location.x + 50, location.y + 100, 650, 190);

class MainWindowListener implements ActionListener {

    private ToolWindow tw;

    MainWindowListener(ToolWindow tw) { = tw;

    public void actionPerformed(ActionEvent e) {
        ToolDialog td = new ToolDialog("One", tw);

class AddPrinButtonListener implements ActionListener {

    private ToolDialog td;

    AddPrinButtonListener(ToolDialog td) { = td;

    public void actionPerformed(ActionEvent e) {

class ChildWindowListener implements WindowListener {
    private ToolDialog td;

    ChildWindowListener(ToolDialog td) { = td;

    public void windowClosing(WindowEvent we) {

    public void windowOpened(WindowEvent we) { }
    public void windowClosed(WindowEvent we) {}
    public void windowIconified(WindowEvent we) {}
    public void windowDeiconified(WindowEvent we) {}
    public void windowActivated(WindowEvent we) {}
    public void windowDeactivated(WindowEvent we) {}

More information about the security-dev mailing list