• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Problem in changing title of frame of outer class by inner class button

 
Greenhorn
Posts: 18
Android Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



In this program outer class create a frame in which a button b call the inner class, Inner class also create a frame in which on pressing button b1 change the tittle of outer class frame.

Well this code is working fine but i want to know is there some better approach instead of creating method? at line 32.

thanks.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this.


 
Ashwin Soni
Greenhorn
Posts: 18
Android Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Alec Porter.




I want to know why "t.setTitle("text changed");" will not work for outer class from inner class but working for inner class from outer class?
 
Alec Porter
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure what exactly your problem is but, if you are calling



in the inner class it will not work because the inner class has no reference to object t inside it.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ashwin, please UseOneThreadPerQuestion. The other thread you started 8 minutes after this one has been closed.
reply
    Bookmark Topic Watch Topic
  • New Topic