NetBeans : How to connect two components , so that they perform the same action? -
i have created jmenuitem , jbutton in jform. there easy way connect them perform same action, using netbeans ide? thank you.
use javax.swing.action implement logic (e.g. extending javax.swing.abstractaction) , assign action menu item and button. both have constructor takes action parameter. 
enabling/disable action enable/disable button , menu item.
see swing tutorial's chapter using actions more details
Comments
Post a Comment