<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ankit Virparia &#187; Life Cycle</title>
	<atom:link href="http://ankit.co/tag/life-cycle/feed" rel="self" type="application/rss+xml" />
	<link>http://ankit.co</link>
	<description>A Programmer, Designer and Trainer</description>
	<lastBuildDate>Sun, 11 May 2014 04:15:47 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.38</generator>
	<item>
		<title>Applet Life Cycle</title>
		<link>http://ankit.co/tutorials/java-tutorials/applet/applet-life-cycle?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=applet-life-cycle</link>
		<comments>http://ankit.co/tutorials/java-tutorials/applet/applet-life-cycle#comments</comments>
		<pubDate>Thu, 03 Jan 2013 18:14:29 +0000</pubDate>
		<dc:creator><![CDATA[Sonali Virparia]]></dc:creator>
				<category><![CDATA[Applet]]></category>
		<category><![CDATA[Life Cycle]]></category>

		<guid isPermaLink="false">http://ankit.co/?p=87</guid>
		<description><![CDATA[<p>Applet life cycle consists of 5 methods which will be automatically invoked by JRE when some action is done on the application/browser. List of Methods: public void init() public void start() public void stop() public void destroy() public void paint(Graphics g) Which method will be invoked when? init() Invoked only once Invoked when the application [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://ankit.co/tutorials/java-tutorials/applet/applet-life-cycle">Applet Life Cycle</a> appeared first on <a rel="nofollow" href="http://ankit.co">Ankit Virparia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Applet life cycle consists of 5 methods which will be automatically invoked by JRE when some action is done on the application/browser.</p>
<p><strong>List of Methods:</strong></p>
<ol>
<li>public void init()</li>
<li>public void start()</li>
<li>public void stop()</li>
<li>public void destroy()</li>
<li>public void paint(Graphics g)</li>
</ol>
<p><strong>Which method will be invoked when?</strong></p>
<p><strong>init()</strong></p>
<ul>
<li>Invoked only once</li>
<li>Invoked when the application is launched using appletviewer or browser</li>
<li>Should include code for component defination, Object creation, Layout settings, Basic look and feel</li>
</ul>
<p><strong>start()</strong></p>
<ul>
<li>Invoked when application is maximized</li>
<li>Default application state is Maximized window so this will also be invoked on launching</li>
<li>Should include code for starting/resuming thread, starting/resuming Graphical User Interface, etc&#8230;</li>
</ul>
<p><strong>stop()</strong></p>
<ul>
<li>Invoked when application is minimized</li>
<li>invoked also when the window is terminated while its in maximizes state.</li>
<li>Should include code for pausing/stopping thread, pausing/stopping Graphical User Interface, etc&#8230;</li>
</ul>
<p><strong>destroy()</strong></p>
<ul>
<li>Invoked when application is about to terminate</li>
<li>invoked when we close the application.</li>
<li>Should include code for connection closing, file closing, etc&#8230;</li>
</ul>
<p><strong>paint()</strong></p>
<ul>
<li>Invoked when application is to be refreshed in terms of GUI</li>
<li>invoked when we start, move or resize applet.</li>
<li>Should include code for GUI design</li>
</ul>
<p><strong>Some method calling scenarios:</strong></p>
<p>On <strong>Launching</strong> an Applet application:  <strong>init(), start(), paint()</strong></p>
<p>On <strong>Minimizing</strong> an Applet application:  <strong>stop()</strong></p>
<p>On <strong>Maximizing</strong> an Applet application: <strong>start(), paint()</strong></p>
<p>On <strong>Moving/Re-sizing</strong> an Applet application: <strong>paint(), paint(), &#8230;, paint()</strong></p>
<p>On <strong>Terminating</strong> an Applet application: <strong>stop(), destroy()</strong></p>
<p>The post <a rel="nofollow" href="http://ankit.co/tutorials/java-tutorials/applet/applet-life-cycle">Applet Life Cycle</a> appeared first on <a rel="nofollow" href="http://ankit.co">Ankit Virparia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ankit.co/tutorials/java-tutorials/applet/applet-life-cycle/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
