This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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 am using to display each page( a panel to take user input) by clicking on menuitem(eg. PersonalDetails).
2. I am declaring , initializing all menuitems in Module.java and on its menuitem click event i call "PersonalDetails.java" and there itself , i disable other menuitems. So far, its working as per me. But, on the display of PersonalDetails class, which contains a GUI form and a "Close "button . On "Close " button event handling i have called setEditable(true) on each menuitem.
It is throwing NullPointerException , since the PersonalDetails class doesn't have anything related to Menuitems, so i want to ask how should i move forward. Do i need to write one Utility class or something else.