DISQUS

Tech-Recipes: Java: Button Press - Action Event | Java programming | Tech-Recipes

  • willy · 10 months ago
    ..do you have any sample program with events...(awt,swing,applet)
  • Confused · 3 months ago
    I found the names chosen here confusing. You have an instance of a JButton named "b", then you have a class name "B", which is the action listener. Then, when you instantiate the handler, you call it "button", when it's not a button. See below:

    JButton b;
    B button;