The Artima Developer Community
Sponsored Link

Java Answers Forum
How to add a property listener for variable

1 reply on 1 page. Most recent reply: Oct 17, 2005 2:53 AM by Matthias Neumair

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Sanjay Perera

Posts: 42
Nickname: angel6
Registered: Apr, 2004

How to add a property listener for variable Posted: Oct 16, 2005 10:44 PM
Reply to this message Reply
Advertisement
Guys and Girls, how to add a property listener for variable. I have string variable and I want to fire a method when the value is getting changed or the value is read. What shall I do?

Origin of the problem....
I have a JFrame and the JMenuBar is an extended class. In the actionPerformed() method I am going to assing a value. In the JFrame (Parent of all) i must run a method of the JFrame class if the value was changed.


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: How to add a property listener for variable Posted: Oct 17, 2005 2:53 AM
Reply to this message Reply
I don't think that's possible for a variable.

You must call the method in the parent frame manually when changing the variable.

Flat View: This topic has 1 reply on 1 page
Topic: Class Conversion problem Previous Topic   Next Topic Topic: Denying access to my page through programs

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use