PopupMenus on Buttons
Quick question. I have 4 buttons in an application, and I want one of the buttons when clicked to bring up a popupmenu. My question is that is it possible to add a JPopupMenu with a JButton. I'm assuming you can add popupmenus on virtually any component, or maybe not...
I don't see why not. You could just add it to your main panel and show the menu when the user clicks the button via the actionPerformed(ActionEvent e) method in the Listener.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL