{"id":25521091,"date":"2022-04-16T15:00:24","date_gmt":"2022-04-16T09:30:24","guid":{"rendered":"https:\/\/entri.app\/blog\/?p=25521091"},"modified":"2022-11-20T11:01:13","modified_gmt":"2022-11-20T05:31:13","slug":"java-applet-life-cycle-an-overview-for-beginners","status":"publish","type":"post","link":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/","title":{"rendered":"Java Applet Life Cycle : An Overview For Beginners"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69e1b7ec30ca8\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69e1b7ec30ca8\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#What_Is_The_Life_Cycle_Of_a_Java_Applet\" >What Is The Life Cycle Of a Java Applet?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#How_Are_JavaScript_and_Java_Different_When_It_Comes_To_Their_Life_Cycles\" >How Are JavaScript and Java Different When It Comes To Their Life Cycles?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#What_Happens_When_An_Applet_Gets_Loaded_Into_a_Browser\" >What Happens When An Applet Gets Loaded Into a Browser?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#What_Happens_If_I_Do_Not_Define_a_Start_Method_In_My_Applet_Class\" >What Happens If I Do Not Define a Start() Method In My Applet Class?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#What_Happens_If_We_Dont_Implement_Destroy_Method_Even_After_We_Have_Defined_It\" >What Happens If We Don&#8217;t Implement Destroy() Method Even After We Have Defined It?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#Is_There_Any_Way_Out_Of_This_Once_An_Applet_Instance_Goes_Into_a_Stop_State\" >Is There Any Way Out Of This Once An Applet Instance Goes Into a Stop State?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#Why_Would_We_Need_Methods_Like_Resize_Stop_Start_and_Destroy_At_All\" >Why Would We Need Methods Like Resize(), Stop(), Start() and Destroy() At All?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#The_Code_Behind\" >The Code Behind<\/a><\/li><\/ul><\/nav><\/div>\n<p>Java applets are small programs that run within your web browser and provide additional interactive features on the web pages you visit. However, applets have somewhat fallen out of favor in recent years due to security concerns, as well as the advent of Flash and other methods of adding additional content to web pages. This article will look at the Java applet life cycle, which shows how each phase of an applet\u2019s interaction with the web page and web browser can be customized, allowing you to perform any necessary actions before moving on to the next phase, such as downloading data from the server or presenting information to the user. <span data-slate-fragment=\"JTVCJTdCJTIydHlwZSUyMiUzQSUyMnBhcmFncmFwaCUyMiUyQyUyMmNoaWxkcmVuJTIyJTNBJTVCJTdCJTIydGV4dCUyMiUzQSUyMkphdmElMjBhcHBsZXRzJTIwbWF5JTIwc2VlbSUyMGxpa2UlMjB0aGUlMjByZWxpY3MlMjBvZiUyMGVhcmx5JTIwaW50ZXJuZXQlMkMlMjBidXQlMjB0aGV5JTIwYXJlJTIwc3RpbGwlMjB1c2VkJTIwaW4lMjBzZXZlcmFsJTIwYXJlYXMlMjBvZiUyMHdlYnNpdGUlMjBkZXZlbG9wbWVudCUyQyUyMGFuZCUyMHRoZXklMjBjYW4lMjBiZSUyMHVzZWQlMjB0byUyMGNyZWF0ZSUyMGludGVyYWN0aXZlJTIwYXBwbGljYXRpb25zJTIwdGhhdCUyMHJ1biUyMG9uJTIwdmlydHVhbGx5JTIwYW55JTIwZGV2aWNlLiUyMFRoZSUyMEphdmElMjBhcHBsZXQlMjBsaWZlJTIwY3ljbGUlMjBkZXNjcmliZXMlMjB0aGUlMjBzdGVwcyUyMHRoYXQlMjB0YWtlJTIwcGxhY2UlMjB3aGVuJTIwYW4lMjBhcHBsZXQlMjBydW5zJTIwaW4lMjB5b3VyJTIwYnJvd3NlciUyQyUyMGZyb20lMjB0aGUlMjBsb2FkaW5nJTIwdG8lMjB0aGUlMjB1bmxvYWRpbmclMkMlMjBhcyUyMHdlbGwlMjBhcyUyMHNvbWUlMjBvZiUyMHRoZSUyMHRoaW5ncyUyMHRoYXQlMjB5b3UlMjBjYW4lMjBkbyUyMGR1cmluZyUyMGVhY2glMjBwaGFzZSUyMHRvJTIwbWFrZSUyMHN1cmUlMjB5b3VyJTIwYXBwbGV0JTIwd29ya3MlMjBhcyUyMGV4cGVjdGVkLiUyMiU3RCU1RCU3RCU1RA==\">Java applets may seem like the relics of the early internet, but they are still used in several areas of website development, and they can be used to create<a href=\"https:\/\/entri.app\/blog\/what-are-oops-concepts-in-java-with-examples\/\" target=\"_blank\" rel=\"noopener\"> interactive applications<\/a> that run on virtually any device. The Java applet life cycle describes the steps that take place when an applet runs in your browser, from the loading to the unloading, as well as some of the things that you can do during each phase to make sure your applet works as expected. When it comes to Java applets, developers are often confused about its life cycle and how it works. They may be able to load an applet into the web browser and embed it into the HTML page, but that\u2019s just the beginning of the journey. Some are confused about what happens when their applet gets activated, runs its code, and then gets stopped again before it reaches its natural termination point. This article will try to shed some light on this matter by explaining what happens when you activate, run, and stop an applet in your Java environment.<\/span><\/p>\n<p><a href=\"https:\/\/bit.ly\/3ELmCiA\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-25522670 size-full\" src=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Rectangle-1.png\" alt=\"Python and Machine Learning Rectangle\" width=\"970\" height=\"250\" srcset=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Rectangle-1.png 970w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Rectangle-1-300x77.png 300w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Rectangle-1-768x198.png 768w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Rectangle-1-750x193.png 750w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_Is_The_Life_Cycle_Of_a_Java_Applet\"><\/span><strong>What Is The Life Cycle Of a Java Applet?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When an applet is loaded into a browser, it goes through four distinct phases: creation, initialization, start-up, and run. Each phase corresponds to a method called on your applet class: init(), start(), doStart() and destroy(). Because these phrases are named identically across different browsers (sometimes spelled differently but with identical meanings), it\u2019s easy for a developer to write an applet that works in many or even all of them. Understanding these four phases is crucial for <a href=\"https:\/\/entri.app\/blog\/is-java-still-relevant-state-of-java-programming\/\" target=\"_blank\" rel=\"noopener\">mastering applets<\/a>. Let\u2019s take a look at each one in detail.<br \/>\nMuleSoft&#8217;s DevOps Handbook: Note: There&#8217;s a newer version of MuleSoft&#8217;s handbook here. The newer version seems better written than their original edition so I&#8217;m using their newer handbook here as well. If you prefer their older version then use that instead. Either way, you should get something out of reading both versions side by side as they cover some topics from slightly different perspectives and have slight differences in emphasis throughout.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_Are_JavaScript_and_Java_Different_When_It_Comes_To_Their_Life_Cycles\"><\/span><strong>How Are JavaScript and Java Different When It Comes To Their Life Cycles?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A lot of people new to programming are surprised by how similar JavaScript and Java code looks. It&#8217;s natural to think, therefore, that they would work similarly. But there is a major difference between their life cycles: JavaScript is interpreted whereas Java code is compiled into machine language before it runs. This means that, with JavaScript, you can usually view your program as it executes. With Java, you cannot see what it does until it&#8217;s finished running. So, where do all these terms come from? And why should you care? In order to answer those questions, we need to go back a little bit. The<a href=\"https:\/\/entri.app\/blog\/understanding-polymorphism-in-java\/\" target=\"_blank\" rel=\"noopener\"> original computer<\/a> systems were all stored on punch cards or punch tape. These were fed into computers through card readers or tape readers; programs were written on them using holes punched out of specific locations on each card or tape. The first computers had no permanent memory. When they needed to run a program, they loaded it from an external source (usually magnetic tape). They also didn&#8217;t have any way of storing data for later use; when you turned off the computer, everything was lost. Over time, however, engineers developed both RAM (random access memory) and ROM (read-only memory). RAM was volatile storage\u2014it was erased when power was cut off\u2014but ROM held its contents even after power was turned off. To make things easier for programmers, some machines could be programmed in assembly language instead of machine code directly.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_Happens_When_An_Applet_Gets_Loaded_Into_a_Browser\"><\/span><strong>What Happens When An Applet Gets Loaded Into a Browser?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When a browser parses an HTML document that contains applets, it creates a new applet object for each one of them. This object is then responsible for creating a subclass of java.applet.Applet known as an AppletContext and returning it to its constructor as shown here: public void init(java.lang.String name, java.util.Properties properties) {&#8230;}. The returned context will be used by your applets at various stages during their lifecycle; more on that below&#8230; The first thing we should look at is what happens when an applet gets loaded into a browser. In essence, all our applets are given three <a href=\"https:\/\/entri.app\/blog\/java-data-types-understanding-the-8-primitive-data-types-in-java\/\" target=\"_blank\" rel=\"noopener\">important methods<\/a> to use throughout their lifetime: init(), start(), and stop(). As you can probably guess from these names, they\u2019re called by either WebStart or Java Plug-in when loading\/starting\/stopping your applet respectively. We\u2019ll discuss how to use these methods shortly. First, let&#8217;s take a quick look at how exactly an applet gets started&#8230; The life cycle of a Java applet starts with load() method call: Upon being loaded into a browser, your applet receives two calls immediately after load(): init() and start(). These two calls are part of what\u2019s known as the life cycle &#8211; which is basically everything that happens between initialization (load()) and termination (stop()). For now, just know that both calls are vital for initializing and starting up your applet.<\/p>\n<p style=\"text-align: center;\"><strong><a href=\"https:\/\/bit.ly\/3ELmCiA\" target=\"_blank\" rel=\"noopener\">Grab the opportunity to learn Python with Entri! Click Here<\/a><\/strong><\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_Happens_If_I_Do_Not_Define_a_Start_Method_In_My_Applet_Class\"><\/span><strong>What Happens If I Do Not Define a Start() Method In My Applet Class?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>An applet class must contain a start() method that is called by a Web browser when it displays an applet. If your class does not contain such a method, or if you have written code that calls other methods instead of (or as well as) start(), then your applet will never be displayed. There are ways around it, but they\u2019re beyond the scope of our introduction. For now, simply make sure you include a valid start() method and that nothing else interferes with its execution. Otherwise, your applet might never be displayed and it could crash your browser. Not good! We\u2019ll look at how to prevent these problems later on. Again, just remember to always include a definition for your start() method and then test it regularly in order to avoid any crashes. Sometimes an error can slip through even after multiple test runs, so don\u2019t forget <a href=\"https:\/\/entri.app\/blog\/java-18-brings-new-features-to-accelerate-software-development-2022\/\" target=\"_blank\" rel=\"noopener\">about implementing<\/a> error-handling routines too. It may seem like overkill, but it won\u2019t take long before you regret not implementing them sooner than later. In case something goes wrong during any stage of applet creation or launch process, throw custom exceptions from main() or start(). It will tell web browser users that something has gone wrong with running the applet. When launching an applet from inside another one: Your parent applet cannot define a new main routine; only subapplets can do so.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_Happens_If_We_Dont_Implement_Destroy_Method_Even_After_We_Have_Defined_It\"><\/span><strong>What Happens If We Don&#8217;t Implement Destroy() Method Even After We Have Defined It?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you don&#8217;t implement destroy() method, then your applet will not be destroyed by JVM as it is supposed to be. For example, if you have implemented start() and stop() methods but have missed destroy() method in your code, then it might cause your browser to hang or crash. If these situations happen frequently when users are running your applets on their computers then they may uninstall <a href=\"https:\/\/entri.app\/blog\/java-data-types-understanding-the-8-primitive-data-types-in-java\/\" target=\"_blank\" rel=\"noopener\">your application<\/a> because of that reason only. Therefore, it is highly recommended that you need to implement all methods declared by an interface which is related with life cycle of applets; otherwise it might lead into unexpected results from end users. What happens if I call System.exit(0) before calling stop(): If you call System.exit(0) before calling stop(), then it would not result into any exception at runtime; however, a fatal error message will be shown on console which tells This application has requested the Runtime to terminate it in an unusual way. After seeing such kind of error message, user would probably uninstall your application and won&#8217;t trust again for using any other apps from your organization\/company.<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/bit.ly\/3ELmCiA\" target=\"_blank\" rel=\"noopener\"><strong>Learn to code from industry experts! Enroll here<\/strong><\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Is_There_Any_Way_Out_Of_This_Once_An_Applet_Instance_Goes_Into_a_Stop_State\"><\/span><strong>Is There Any Way Out Of This Once An Applet Instance Goes Into a Stop State?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Yes. But be warned, there is no way to make an applet instance come back from a stop state except by having a new one replace it. When an applet is created, it is initialized and its init() method is called. This occurs before any of its other methods are called. If you need something specific done once your applet has been loaded and initialized (but not necessarily started), then your init() method should take care of it for you. In more advanced programming, you could even create <a href=\"https:\/\/entri.app\/blog\/java-data-types-understanding-the-8-primitive-data-types-in-java\/\" target=\"_blank\" rel=\"noopener\">separate classes<\/a> that handle each of these phases separately, but that\u2019s beyond what we\u2019re looking at here! However, if you do decide to do that, remember that your applet will only enter a running state if all its required resources have been downloaded. As such, consider downloading those resources as soon as possible after initialization so they don&#8217;t get in the way of running code later on. Now let&#8217;s move on to our next phase: start().<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Why_Would_We_Need_Methods_Like_Resize_Stop_Start_and_Destroy_At_All\"><\/span><strong>Why Would We Need Methods Like Resize(), Stop(), Start() and Destroy() At All?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>It all has to do with how applets need to behave when they\u2019re first loaded before they get resized, and so on. To figure out what happens at each stage, let\u2019s look at a quick example of an applet called MyApplet. The life cycle of an applet is broken up into five different stages: Start, Resize, Stop, Destroy and Finalize. Let\u2019s take a closer look at each one. 1) Start &#8211; In its start() method, you can write code that needs to be executed only once, like initializing variables or <a href=\"https:\/\/entri.app\/blog\/future-thought-on-java-check\/\" target=\"_blank\" rel=\"noopener\">creating objects<\/a>. Also, if you want your applet to appear on top of other windows (for example), you can use setVisible(true). However, keep in mind that setVisible(true) will cause your applet to start drawing immediately which may slow down your computer! 2) Resize &#8211; If you have a window that needs to be resized after it has been displayed for some time (for example), call its resize() method.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"The_Code_Behind\"><\/span><strong>The Code Behind<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The init() method is one of three methods that is called when an applet has finished loading. This method will be invoked immediately after all other code required for starting up and displaying an applet has run. In addition, it will only run once at most (unless a reload is initiated, more on that later). If you have an initialization code that needs to occur every time <a href=\"https:\/\/entri.app\/blog\/java-data-types-understanding-the-8-primitive-data-types-in-java\/\" target=\"_blank\" rel=\"noopener\">your application<\/a> starts up then you should use init(), but generally speaking, if you initialize something from startApp() then there\u2019s no need to repeat it from init(). It\u2019s not uncommon to see newbies try and place their main logic inside init(), which can cause them to forget about things like restarting or exiting completely. Remember: do not put anything related to your main logic into init(). The best way to think about it is that init() should only contain what needs to happen every time an applet loads, not what happens during normal operation. If you are interested to learn new coding skills, the Entri app will help you to acquire them very easily. Entri app is following a structural study plan so that the students can learn very easily. If you don&#8217;t have a coding background, it won&#8217;t be any problem. You can download the Entri app from the google play store and enroll in your favorite course.<\/p>\n<p style=\"text-align: center;\"><strong><a href=\"https:\/\/bit.ly\/3ELmCiA\" target=\"_blank\" rel=\"noopener\">Learn Coding in your Language! Enroll Here!<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java applets are small programs that run within your web browser and provide additional interactive features on the web pages you visit. However, applets have somewhat fallen out of favor in recent years due to security concerns, as well as the advent of Flash and other methods of adding additional content to web pages. This [&hellip;]<\/p>\n","protected":false},"author":93,"featured_media":25521098,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[802,1864,1882,1881],"tags":[],"class_list":["post-25521091","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-data-science-ml","category-java-programming","category-web-android-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Java Applet Life Cycle : An Overview For Beginners - Entri Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java Applet Life Cycle : An Overview For Beginners - Entri Blog\" \/>\n<meta property=\"og:description\" content=\"Java applets are small programs that run within your web browser and provide additional interactive features on the web pages you visit. However, applets have somewhat fallen out of favor in recent years due to security concerns, as well as the advent of Flash and other methods of adding additional content to web pages. This [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/\" \/>\n<meta property=\"og:site_name\" content=\"Entri Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/entri.me\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-16T09:30:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-20T05:31:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Untitled-8-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"820\" \/>\n\t<meta property=\"og:image:height\" content=\"615\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Akhil M G\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@entri_app\" \/>\n<meta name=\"twitter:site\" content=\"@entri_app\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Akhil M G\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/\"},\"author\":{\"name\":\"Akhil M G\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/875646423b2cce93c1bd5bc16850fff6\"},\"headline\":\"Java Applet Life Cycle : An Overview For Beginners\",\"datePublished\":\"2022-04-16T09:30:24+00:00\",\"dateModified\":\"2022-11-20T05:31:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/\"},\"wordCount\":2045,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Untitled-8-1.png\",\"articleSection\":[\"Articles\",\"Data Science and Machine Learning\",\"Java Programming\",\"Web and Android Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/\",\"url\":\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/\",\"name\":\"Java Applet Life Cycle : An Overview For Beginners - Entri Blog\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Untitled-8-1.png\",\"datePublished\":\"2022-04-16T09:30:24+00:00\",\"dateModified\":\"2022-11-20T05:31:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#primaryimage\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Untitled-8-1.png\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Untitled-8-1.png\",\"width\":820,\"height\":615,\"caption\":\"Java Applet Life Cycle : An Overview For Beginners\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/entri.app\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Entri Skilling\",\"item\":\"https:\/\/entri.app\/blog\/category\/entri-skilling\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Java Programming\",\"item\":\"https:\/\/entri.app\/blog\/category\/entri-skilling\/java-programming\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Java Applet Life Cycle : An Overview For Beginners\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/entri.app\/blog\/#website\",\"url\":\"https:\/\/entri.app\/blog\/\",\"name\":\"Entri Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/entri.app\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/entri.app\/blog\/#organization\",\"name\":\"Entri App\",\"url\":\"https:\/\/entri.app\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"width\":989,\"height\":446,\"caption\":\"Entri App\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/entri.me\/\",\"https:\/\/x.com\/entri_app\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/875646423b2cce93c1bd5bc16850fff6\",\"name\":\"Akhil M G\",\"url\":\"https:\/\/entri.app\/blog\/author\/akhil\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java Applet Life Cycle : An Overview For Beginners - Entri Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/","og_locale":"en_US","og_type":"article","og_title":"Java Applet Life Cycle : An Overview For Beginners - Entri Blog","og_description":"Java applets are small programs that run within your web browser and provide additional interactive features on the web pages you visit. However, applets have somewhat fallen out of favor in recent years due to security concerns, as well as the advent of Flash and other methods of adding additional content to web pages. This [&hellip;]","og_url":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/","og_site_name":"Entri Blog","article_publisher":"https:\/\/www.facebook.com\/entri.me\/","article_published_time":"2022-04-16T09:30:24+00:00","article_modified_time":"2022-11-20T05:31:13+00:00","og_image":[{"width":820,"height":615,"url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Untitled-8-1.png","type":"image\/png"}],"author":"Akhil M G","twitter_card":"summary_large_image","twitter_creator":"@entri_app","twitter_site":"@entri_app","twitter_misc":{"Written by":"Akhil M G","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#article","isPartOf":{"@id":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/"},"author":{"name":"Akhil M G","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/875646423b2cce93c1bd5bc16850fff6"},"headline":"Java Applet Life Cycle : An Overview For Beginners","datePublished":"2022-04-16T09:30:24+00:00","dateModified":"2022-11-20T05:31:13+00:00","mainEntityOfPage":{"@id":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/"},"wordCount":2045,"commentCount":0,"publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"image":{"@id":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Untitled-8-1.png","articleSection":["Articles","Data Science and Machine Learning","Java Programming","Web and Android Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/","url":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/","name":"Java Applet Life Cycle : An Overview For Beginners - Entri Blog","isPartOf":{"@id":"https:\/\/entri.app\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#primaryimage"},"image":{"@id":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Untitled-8-1.png","datePublished":"2022-04-16T09:30:24+00:00","dateModified":"2022-11-20T05:31:13+00:00","breadcrumb":{"@id":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#primaryimage","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Untitled-8-1.png","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Untitled-8-1.png","width":820,"height":615,"caption":"Java Applet Life Cycle : An Overview For Beginners"},{"@type":"BreadcrumbList","@id":"https:\/\/entri.app\/blog\/java-applet-life-cycle-an-overview-for-beginners\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/entri.app\/blog\/"},{"@type":"ListItem","position":2,"name":"Entri Skilling","item":"https:\/\/entri.app\/blog\/category\/entri-skilling\/"},{"@type":"ListItem","position":3,"name":"Java Programming","item":"https:\/\/entri.app\/blog\/category\/entri-skilling\/java-programming\/"},{"@type":"ListItem","position":4,"name":"Java Applet Life Cycle : An Overview For Beginners"}]},{"@type":"WebSite","@id":"https:\/\/entri.app\/blog\/#website","url":"https:\/\/entri.app\/blog\/","name":"Entri Blog","description":"","publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/entri.app\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/entri.app\/blog\/#organization","name":"Entri App","url":"https:\/\/entri.app\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","width":989,"height":446,"caption":"Entri App"},"image":{"@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/entri.me\/","https:\/\/x.com\/entri_app"]},{"@type":"Person","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/875646423b2cce93c1bd5bc16850fff6","name":"Akhil M G","url":"https:\/\/entri.app\/blog\/author\/akhil\/"}]}},"_links":{"self":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25521091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/users\/93"}],"replies":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/comments?post=25521091"}],"version-history":[{"count":3,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25521091\/revisions"}],"predecessor-version":[{"id":25547596,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25521091\/revisions\/25547596"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media\/25521098"}],"wp:attachment":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media?parent=25521091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/categories?post=25521091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/tags?post=25521091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}