• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Swingworker question

 
Greenhorn
Posts: 8
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,
I was wondering how to acces a variable in the outher class from an anonymous inner class. The code is like this:

The 'this' has to be the class in which the swingworker is created but in this example the 'this' is the anonymous swingworker class.
How do i acces the outer class??
 
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There might be some trick way to get it using syntax similar to super.this, but I'm not familiar with it. How about this?
 
Ruben Demuynck
Greenhorn
Posts: 8
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yip there is i just discovered it yesterday.
in stead of outer.this its the name of the Outer class.this
in my case it was MainGui.this
thx for the reply
 
reply
    Bookmark Topic Watch Topic
  • New Topic