Disable « Menu « Java Swing Q&A





1. Menu items become disabled in Mac when an "AlwaysOnTop" frame is showing    stackoverflow.com

I have some frames that have the property alwaysOnTop set to true. If this frames are showing and the main frame shows a modal dialog, all menu items stay disabled until ...

2. How to prevent a disabled JMenuItem from hiding the menu when being clicked?    stackoverflow.com

In my Java swing application i have noticed that when i click on a disabled JMenuItem in a JPopupMenu it hides the menu, but i i do not want to hide ...

3. How do I disable java swing menu items?    stackoverflow.com

I used the awt to make a menu and populated that menu with several items. How do I "disable" the menu items?

4. Java: Disabling an Action should disable JButtons and JMenuItems    stackoverflow.com

I'm writing a fairly simple IDE for developing embedded programs (for iRobot's Create platform) and almost every single button and menu item is backed by Java's Action system. This has made it ...

5. Enabling a disabled Menu Item    coderanch.com

Very straight forward code but it is thrown across multiple classes. I build the JMenuItem and then disable it. Add it to a JMenuBar. Along the lines a user can do a file->open that will trigger this item to be active. I would also like to use this with Copy/Cut/Paste under an edit menu. I put together a little snippit of ...

6. How to disable Menubar    coderanch.com

Hi All, I created a menubar, I just want to disable the menus, once I selected one of the menu items until I finish with that one( like in most windows applications, once we select a menuItem like File- new - the menus will be disabled until we are done ). I couldnt find a method to disable the menubar. I ...

7. Disable and enable buttons based on menu item chosen    coderanch.com

Hello all, I am building a simple hangman game and have run into some trouble. I am able to reset all of my instance variables if a new game is chosen from the menu bar but I am unable to enable all of the buttons again (The buttons are disabled if they are chosen while the game is being played). Below ...

8. How Can I Disable Menu-Items?    coderanch.com

I have the following code to implement an edit menu. For now, I want to be able to control which menu-items are enabled or disabled by implementing the method: menuSelected(MenuEvent). I thought that I had this working, but now, all of the menu-items are always enabled. (I've tried this with and without implementing an ActionListener interface. package test; import javax.swing.JFrame; import ...

9. Menu items disabling    coderanch.com





11. enabling & disabling menuitems    coderanch.com

I am developing one project that has one Menubar that contains following Menu & each Menu then contains some MenuItems : Menu are: 1. Enter Records. 2. Candidate's Status. "Enter Records" Menu contains following MenuItems : 1. PersonalDetails 2. Enter Marks. 3. Cut-off. "Candidate's status" Menu contains following MenuItems: 1. Search Status. 2. Debarred List. Each Menuitems is a Panel(i.e a ...

12. enabling & disabling menuitems    coderanch.com

sir, I have already used setEnabled() method , but the case is , it is disabling all menuitems but when i call setEnabled(true) then it is not enabling the menuitems. Moreover, my class hierarchy is like as follows: 1. Module.java : it is a frame that contains two Panels , one panel contains Menubar while second panel is emtpy which i ...

14. I want to disable the Minimize / Maximize options on the System Menu    coderanch.com

When my JDialog is being displayed if the user right clicks the title bar a system menu is displayed with the options: Restore, Move, Size, Minimize, Maximize, and Close. Even though my setResizable() property is set to false sometimes the maximize or minimize or both are not greyed out. If the user clicks either option the JDialog has no way to ...

15. Customizing appearance of disabled menus and menu items    java-forums.org

My app is using the system look and feel, but disabled menu items don't look like they do in native apps... or in Eclipse, for that matter. Instead of being gray, they actually look bolder. Closer inspection reveals that they're being displayed in white text (the same as enabled items) with a white "drop shadow" slightly offset. How can I make ...