In the constructor of my main window I create a button with the following simple code:
JButton jbOptions = new JButton("Options"); buttonsPanel.add(jbOptions); jbOptions.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ new OptionsDialog(); } });
I now need to pass to the constructor OptionsDialog link to JFrame. How to do it? this is a reference to ActionListener .
source share