blob: c63341f6dc46f80fa6a0413d451ac9d65a6c9517 [file] [log] [blame]
import javax.swing.*;
import java.awt.event.ActionEvent;
public class ExtractMethods { }
abstract class MyButton
extends JButton
{
protected MyButton( String text ) {
super( text );
}
}
class Foo {
private JButton createOKButton() {
return new MyButton( "OK" ) {
public void actionPerformed( ActionEvent e ) {
newMethod();
}
private void newMethod() {
setVisible( false );
}
};
}
}