Я получаю сообщение об ошибке при попытке вызвать метод getuserinput. Вот мой бит кода, который не работает.
initialvelocitybutton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
getuserinput(); //I am getting an error saying "The method getuserinput() is undefined for the type new ActionListener(){}"
}
});
static void getuserinput(){ //method to get users input
double initialvelocity = Double.parseDouble(
JOptionPane.showInputDialog("please enter initial velocity")); //gets initial value of intiial velcoity
double angleoflaunch = Double.parseDouble(
JOptionPane.showInputDialog("please enter angle of launch"));
}