Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Close button disabling and MenuBar questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Close button disabling and MenuBar questions



Hi.

Don't you really hate it when you a question and someone responds with "Don't do it that way."? Unfortunately, I have to say, "Don't do it that way. " :)

The Apple Human Interface guidelines specifically state (on p190)

Every document and application window and panel should have, at a minimum:
■ A title bar. Even if a window does not have an actual title (a tools panel, for example), it should have a
title bar so that users can move the window.
■ A close button, so that users have a consistent way to dismiss the window.


They even have a picture, Goofus and Gallant style! (For those not familiar with this reference :
http://en.wikipedia.org/wiki/Highlights_for_Children#Goofus_.26_Gallant


Attachment: pastedGraphic.pdf
Description: Adobe PDF document




Maybe with this information as background you'll understand why Apple's Java implementation has no facility for doing what you want. So again, I'd say, "don't do it that way." :)


For problem number two, the best solution I've found is to use an offscreen window that is displayed when no other windows are open. It will have your JMenuBar, and it will look like a normal Mac application when no other windows are open, by displaying the hidden window's JMenuBar.


Rob


On Jun 18, 2009, at 5:56 AM, Stef Kuypers wrote:

Hi,

I'm currently writing a Swing application on the Mac. THere are a couple of things that I don't find a solution for at the moment.

- I have a window in which I want to disable the close button. I don't just want to have it do nothing, I actually want to make it look disabled too. Anyone know how this is done?
- I want to have one menu bar for my entire application. Right now I solved the problem by creating a JFrame class which has a JMenuBar and I subclass all my JFrames from it. The only problem I have is when no frames are open. Then I would still like to have the menu bar visible as is common in Mac applications.


Any help will be appreciated.

Kind regards,
Stef Kuypers
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Close button disabling and MenuBar questions (From: Stef Kuypers <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.