[4782] in java-interest

home help back first fref pref prev next nref lref last post

Can't call methods in my applet

daemon@ATHENA.MIT.EDU (Mike Afergan)
Sun Jan 14 04:12:50 1996

From: mikea@ai.mit.edu (Mike Afergan)
To: java-interest@java.sun.com
Date: Sat, 13 Jan 1996 19:35:04 GMT

	I am extending the java.awt.Scrollbar class to enable  the user to
change more than just the position of the scrollbar.  I wish to update
some fields in the main applet and thus have created a calculate()
method in my main applet.
	I pass a refrence *Calc) to the applet in the scrollbar constructor,
but get this error message when I try to call calculate:

C:\html\classes>c:\jdk2\java\bin\javac slider.java
slider.java:68: Can't make static reference to method void calculate()
in class
Calc.
                Calc.calculate();
                              ^

Can anyone:  1.  Exlpain this problem -- Why can't I do this?
	         2.  Suggest a method by which I can trigger an updating

		method in the applet class.

	Thanks,

	-- Mike

-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post