This commit is contained in:
Dmitry Jemerov
2009-09-10 20:21:16 +04:00
parent 72f81ba46b
commit b7e66aee44
170 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
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 ) {
<selection> setVisible( false ); </selection>
}
};
}
}