Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. public void methodName(String results) {
  2. this.results = results;
  3. }
  4.  
  5. Button.addActionListener(new ActionListener() {
  6. public void actionPerformed(ActionEvent event) {
  7. this.methodName(asdf);
  8. }
  9.  
  10. Something some = new Something() {
  11.  
  12. public void overridden() {
  13. YourClass.this.methodName("test");
  14. }
  15.  
  16. };
  17.  
  18. Button.addActionListener(new ActionListener() {
  19. public void actionPerformed(ActionEvent event) {
  20. methodName(asdf);
  21. }
  22.  
  23. final MyClass enclosingClass = this;
  24. Button.addActionListener(new ActionListener() {
  25. public void actionPerformed(ActionEvent event) {
  26. enclosingClass.methodName(asdf);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement