[Solved] Why can’t this method be called inside actionListener?
[ad_1] If you want to call method from listener implementation, put it out side implementation. For example, JButton btnCompute = new JButton(“Compute”); public void handleAction() { btnCompute.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { int n1 = 5; int n2 = 4; int minValue = minFunction(n1, n2); } catch (NumberFormatException ex) { } … Read more