posted 14 years ago
Your given code looks fine except you didn't add the menu items to the menu. About those enter and esc keys... if you don't have the menu selected they don't do anything, same for arrow keys.
Default your app central panel has the control (eg your JTable when you get to that). So when app runs, all keys don't do anything until you do "ALT+F" to select the file menu then the menu items show up. Oh your code doesn't have mnenomic for Search, despite you have for the menu items.
have you done your action listeners? Try outputting something when you trigger the menu item using mouse or enter key.
Oh just a tip for your search, your first 2 menu items (name, location) are really name only and location only respectively meaning the OR logic. This makes your 3rd menu item the AND (eg name AND location).
If you run my code your keys will work.
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP