This is sort of GUI-related, but I think it's really a basic Java question so I'm posting here. I've got the following code that is trying to create a simple numeric entry box:
When I go to compile this, I get the following error from the Java compiler:
com\FEIZyfer\Comm2Mon\Main.java:793: cannot find symbol symbol : method addPropertyChangeListener(java.lang.String,com.FEIZyfer.comm2mon.controlPanelPane) location: class javax.swing.JFormattedTextField antdField.addPropertyChangeListener("value", this);
It seems that the compiler doesn't know what addPropertyChangeListener is. But this is right out of the example on (Sun's site. I checked all my import statements and they look OK. Thoughts?
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
FormattedTextFieldDemo.java compiles OK for me, but if I comment out this line
The Sun example (FormattedTextFieldDemo.java) compiles for me as well, so there's something different in the files. But I can't tell what.
Joel McNary
Bartender
Joined: Aug 20, 2001
Posts: 1815
posted
0
Make sure that your class implements PropertyChangeListener -- without seeing your class in its entirity, I think that this is the most likely cause of the error.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.