In netbeans I have a JDialog with a JPanel component (called Keypad). I simply draged and droped the JPanel Keypad onto JDialog and netbeans generated the code. On the Keypad I have an Enter button for which I am trying to detect ActionPerformed (button pressed) in the JDialog. Is this possible and how do I do it?
Share
You have to add an ActionListener to your Enter button. You need to pass a reference to your JDialog in the JPanel constructor so you can communicate with it. You either need to implement ActionListener or you can use an anonymous class: