I have a drop down menu in java with 3 options and right next to it a run button.
I am using eclipse in java and using apache wicket and html to run the program in a web browser. my question is, if i choose print data from the drop down and click on the run button it should print printing successful in the console. i have tried various methods, and its compiling but just not showing me the message that it should do according to the system.out.println statement.
Button b = new Button("Ausführen");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if(role.getValue().equals("Print Data")) {
System.out.println("Printing successfull!");
}
}
});
form.add(b);
any ideas why?
ActionListener is not going to work with Apache Wicket I guess. Just use a normal Form Button, then create a seperate Print Class and write a print method in your onSubmit method.