Is there any way to automatically generate appropriate listener in NetBeans?
For example, when I have JButton, and I type button.addActionListener, I’d like NetBeans to generate following code:
new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
throw new UnsupportedOperationException("Not supported yet.");
}
}
NetBeans is capable of pregenerating listeners, without using Code Templates.
It is possible by typing new SomeListener and pressing CTRL+Space.
And viola!