UI State Management
I have a question on the state management. I do not see how could be easily manage the UI state in J2SE/Swing. For example, when I click the a tree node, the menu should be changed, some menu item is disabled and some menuitem is removed. When the focus moved to other tree node, the menu changed again based on the context. For my application, there could be more than 20 different states there and need to adjust menu/toolbar correspondently. So based on each state to disable/hide menu in hardcoding is really not a decent way.