I am converting a medium-size (13892 LOC) Java Swing application into an applet.
So far, I've got the applet running and showing both in the Applet Viewer (via Eclipse) and showing in the browser (tested with Chrome and Firefox).
However, no click events are being registered by the application. Neither for JMenuItem, JButton, etc.
The general structure of the app is the following
public class MainWindow extends JInternalFrame implements ActionListener {
...
private JToolBar toolBar;
private JButton btnOpen;
...
toolBar = new JToolBar();
getContentPane().add(toolBar, BorderLayout.NORTH);
btnOpen = new JButton("Open");
btnOpen.addActionListener(this);
toolBar.add(btnOpen);
...
@Override
public void actionPerformed(ActionEvent event) {
btnOpen.setText("ACTION PERFORMED");
if (event.getSource().equals(btnOpen)) {
btnOpen_clicked();
}
private void btnOpen_clicked() {
btnOpen.setText(btnOpen.getText()+"/YAY!");
}
}
Any clue on why would this happen?