Re: [SLUG] Java question

From: Andrew M. Hoerter (amh@pobox.com)
Date: Sat Nov 01 2003 - 22:44:25 EST


On Sat, 1 Nov 2003, Russ Wright wrote:

> Okay I created the public void start() function and moved the code that
> generates the statusbar message to there. I still don't see the message.

Well, it doesn't work here either, and I'm not sure why to tell you the
truth. It doesn't seem like there should be any dependencies between
showStatus() and stuff you left in init(). I'm sure there is a Java guru
here who can explain.

But, it does work when you don't override init() and simply do everything
in start(), as I suggested. This kind of thing is really not what init()
is intended for, anyway. You could almost think of it as a constructor,
and then start() and stop() act as an on/off switch once the applet is
loaded (you'd probably want to repaint your GUI items in this case, I
would think, which presumably doesn't happen if that stuff is in init()).

As should be obvious, I'm not a Java expert by any means!

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:36:46 EDT