can i set a window Listener to JApplet

can i set a window listener to applet if yes how?thanks
[76 byte] By [b_babu] at [2007-9-26 1:22:41]
# 1
No, why would you want to do such thing? JApplets can't be closed, iconified etc.
jsalonen at 2007-6-29 1:00:06 > top of Java-index,Archived Forums,Swing...
# 2
yes. your applet class can extend WindowListener iterface and implement it's methods.class A extends JApplet implements WindowListener
aparna_chitragar at 2007-6-29 1:00:07 > top of Java-index,Archived Forums,Swing...
# 3
can you add that windowlistener in the applet?
jsalonen at 2007-6-29 1:00:07 > top of Java-index,Archived Forums,Swing...
# 4

boss

my problem is i have some drawing in the panel.when i minimize the window it will disappear because it is dynamically getting drawn.So, for capuring the old drawing, i store the coordinates into the vector and

trying to redraw by calling a method when applet gets

maximized.

Initially the application was a stand alone , so i used

JFrame and window listener and whenever frame gets activated , i used to redraw the line . Now we have changed to applet.

And i tried to implement window listener, i could not able to add listener to the contenetPane.

So i decided to call my drawing method from START(),Since start is been called whenever applet is activated.I decided to do so.

But the problem is ,it is calling the method,identifying the

coordinates but the lines are not appearing in the screen.

My suspection is, it is drawing the line and once again

repainting the screen automatically.

If u people wants to see am ready to post the code.

b_babu at 2007-6-29 1:00:07 > top of Java-index,Archived Forums,Swing...