{"id":40741,"date":"2016-09-08T15:00:53","date_gmt":"2016-09-08T12:00:53","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=40741"},"modified":"2016-09-08T02:24:12","modified_gmt":"2016-09-07T23:24:12","slug":"java-swing-jwindow-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/","title":{"rendered":"Java Swing JWindow Example"},"content":{"rendered":"<p>A <code>JWindow<\/code> is a container that can be displayed anywhere on the user&#8217;s desktop. It does not have the title bar, window-management buttons, or other trimmings associated with a <code>JFrame<\/code>, but it is still a &#8220;first-class citizen&#8221; of the user&#8217;s desktop, and can exist anywhere on it.<\/p>\n<h2>1. Introduction<\/h2>\n<p>The <code>JWindow<\/code> component contains a <code>JRootPane<\/code> as its only child. The <code>contentPane<\/code> should be the parent of any children of the <code>JWindow<\/code>. As a convenience add and its variants, remove and <code>setLayout<\/code> have been overridden to forward to the contentPane as necessary. This means you can write:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>JwindowExample.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">window.add(child);\r\n<\/pre>\n<p>And the child will be added to the contentPane. The contentPane will always be non-null. Attempting to set it to null will cause the JWindow to throw an exception. The default contentPane will have a BorderLayout manager set on it.<\/p>\n<p>Like a <code>JFrame<\/code>, a <code>JWindow<\/code> is another top-level container. It is as an undecorated <code>JFrame<\/code>. It does not have features like a title bar, windows menu, etc. It is not a very commonly used top-level container. You can use it as a splash window that displays once when the application is launched and then automatically disappears after a few seconds.<\/p>\n<h2>1.1 Setup<\/h2>\n<p><b>Popular Java Editors:<\/b><br \/>\nTo write your java programs you will need a text editor. There are even more sophisticated IDE available in the market. But for now, you can consider one of the following:<\/p>\n<ul>\n<li><b>Notepad<\/b>: On Windows machine you can use any simple text editor like Notepad TextPad.<\/li>\n<li><b>NetBeans<\/b>: is a Java IDE that is open source and free which can be downloaded from <a href=\"http:\/\/www.netbeans.org\/index.html\">http:\/\/www.netbeans.org\/index.html<\/a>.<\/li>\n<li><b>Eclipse<\/b>: is also a java IDE developed by the eclipse open source community and can be downloaded from <a href=\"http:\/\/www.eclipse.org\">http:\/\/www.eclipse.org<\/a><\/li>\n<\/ul>\n<p><b>Prerequisite<\/b><br \/>\nThis example is developed on Eclipse therefore a compatible Eclipse IDE is required to be installed on the system.<br \/>\nWe also need WindowBuilder tool to be installed on Eclipse IDE for the easiness of the work. To learn how to install WindowBuilder tool please visit the Setup section 2.1 of the following link <a href=\"https:\/\/examples.javacodegeeks.com\/desktop-java\/swing\/java-swing-form-example\/\"><strong>click here<\/strong><\/a>.<\/p>\n<h2>2. Class Declaration<\/h2>\n<p>Following is the declaration for <b>javax.swing.JWindow<\/b> class:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>JwindowExample.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">public class JWindow\r\n   extends Window\r\n      implements Accessible, RootPaneContainer\r\n<\/pre>\n<h3>2.1 Field<\/h3>\n<p>Following are the fields for <b>java.awt.Component<\/b> class:<\/p>\n<ul>\n<li><b>protected AccessibleContext accessibleContext<\/b> &#8212; The accessible context property.<\/li>\n<li><b>protected JRootPane rootPane<\/b> &#8212; The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.<\/li>\n<li><b>protected boolean rootPaneCheckingEnabled<\/b> &#8212; If true then calls to add and setLayout will be forwarded to the contentPane.<\/li>\n<\/ul>\n<h3>2.2 Class constructors<\/h3>\n<ul>\n<li><b>JWindow()<\/b><br \/>\nCreates a window with no specified owner.<\/li>\n<li><b> JWindow(Frame owner)<\/b><br \/>\nCreates a window with the specified owner frame.<\/li>\n<li><b>JWindow(GraphicsConfiguration gc)<\/b><br \/>\nCreates a window with the specified GraphicsConfiguration of a screen device.<\/li>\n<li><b>JWindow(Window owner)<\/b><br \/>\nCreates a window with the specified owner window.<\/li>\n<li><b>JWindow(Window owner, GraphicsConfiguration gc)<\/b><br \/>\nCreates a window with the specified owner window and GraphicsConfiguration of a screen device.<\/li>\n<\/ul>\n<h3>2.3 Class methods<\/h3>\n<ul>\n<li><b>protected void addImpl(Component comp, Object constraints, int index)<\/b><br \/>\nAdds the specified child Component.<\/li>\n<li><b>protected JRootPane createRootPane()<\/b><br \/>\nCalled by the constructor methods to create the default rootPane.<\/li>\n<li><b>AccessibleContext getAccessibleContext()<\/b><br \/>\nGets the AccessibleContext associated with this JWindow.<\/li>\n<li><b> Container getContentPane()<\/b><br \/>\nReturns the Container which is the contentPane for this window.<\/li>\n<li><b> Component getGlassPane()<\/b><br \/>\nReturns the glassPane Component for this window.<\/li>\n<li><b> Graphics getGraphics()<\/b><br \/>\nCreates a graphics context for this component.<\/li>\n<li><b> JLayeredPane getLayeredPane()<\/b><br \/>\nReturns the layeredPane object for this window.<\/li>\n<li><b> JRootPane getRootPane()<\/b><br \/>\nReturns the rootPane object for this window.<\/li>\n<li><b> TransferHandler getTransferHandler()<\/b><br \/>\nGets the transferHandler property<\/li>\n<li><b> protected boolean isRootPaneCheckingEnabled()<\/b><br \/>\nReturns whether calls to add and setLayout are forwarded to the contentPane.<\/li>\n<li><b> protected String paramString()<\/b><br \/>\nReturns a string representation of this JWindow.<\/li>\n<li><b> void remove(Component comp)<\/b><br \/>\nRemoves the specified component from the container.<\/li>\n<li><b> void repaint(long time, int x, int y, int width, int height)<\/b><br \/>\nRepaints the specified rectangle of this component within time milliseconds.<\/li>\n<li><b> void setContentPane(Container contentPane)<\/b><br \/>\nSets the contentPane property for this window.<\/li>\n<li><b> void setGlassPane(Component glassPane)<\/b><br \/>\nSets the glassPane property.<\/li>\n<li><b> void setLayeredPane(JLayeredPane layeredPane)<\/b><br \/>\nSets the layeredPane property.<\/li>\n<li><b> void setLayout(LayoutManager manager)<\/b><br \/>\nSets the LayoutManager.<\/li>\n<li><b> protected void setRootPane(JRootPane root)<\/b><br \/>\nSets the new rootPane object for this window.<\/li>\n<li><b> protected void setRootPaneCheckingEnabled(boolean enabled)<\/b><br \/>\nSets whether calls to add and setLayout are forwarded to the contentPane.<\/li>\n<li><b>void setTransferHandler(TransferHandler newHandler)<\/b><br \/>\nSets the transferHandler property, which is a mechanism to support transfer of data into this component.<\/li>\n<li><b> void update(Graphics g)<\/b><br \/>\nCalls paint(g).<\/li>\n<li><b> protected void windowInit()<\/b><br \/>\nCalled by the constructors to init the JWindow properly.<\/li>\n<\/ul>\n<h3>2.4 Methods inherited<\/h3>\n<p>This class inherits methods from the following classes:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<ul>\n<li>java.awt.Window<\/li>\n<li>java.awt.Container<\/li>\n<li>java.awt.Component<\/li>\n<li>java.lang.Object<\/li>\n<\/ul>\n<h2>3. JWindow Example<\/h2>\n<p>Create the following java program using any editor of your choice<\/p>\n<p><span style=\"text-decoration: underline;\"><em>JwindowExample.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">package swing;\r\n\r\nimport java.awt.*;\r\nimport java.awt.event.*;\r\nimport javax.swing.*;\r\n\r\npublic class JwindowExample{\r\n   private JFrame mainFrame;\r\n   private JLabel headerLabel;\r\n   private JLabel statusLabel;\r\n   private JPanel controlPanel;\r\n   private JLabel msglabel;\r\n\r\n   public JwindowExample(){\r\n      prepareGUI();\r\n   }\r\n\r\n   public static void main(String[] args){\r\n      JwindowExample JwindowExampledemo= new JwindowExample();  \r\n      JwindowExampledemo.showJWindowDemo();\r\n   }\r\n\r\n   private void prepareGUI(){\r\n      mainFrame = new JFrame(\"Java Swing Examples\");\r\n      mainFrame.setSize(400,400);\r\n      mainFrame.setLayout(new GridLayout(3, 1));\r\n      mainFrame.addWindowListener(new WindowAdapter() {\r\n         public void windowClosing(WindowEvent windowEvent){\r\n            System.exit(0);\r\n         }        \r\n      });    \r\n      headerLabel = new JLabel(\"\", JLabel.CENTER);        \r\n      statusLabel = new JLabel(\"\",JLabel.CENTER);    \r\n\r\n      statusLabel.setSize(350,100);\r\n\r\n      msglabel = new JLabel(\"Welcome to  SWING Tutorial.\"\r\n         , JLabel.CENTER);\r\n\r\n      controlPanel = new JPanel();\r\n      controlPanel.setLayout(new FlowLayout());\r\n\r\n      mainFrame.add(headerLabel);\r\n      mainFrame.add(controlPanel);\r\n      mainFrame.add(statusLabel);\r\n      mainFrame.setVisible(true);  \r\n   }\r\n\r\n   private void showJWindowDemo(){\r\n      headerLabel.setText(\"Container in action: JWindow\");   \r\n      final MessageWindow window = new MessageWindow(mainFrame, \"Welcome to  SWING Tutorial.\");\r\n\r\n      JButton okButton = new JButton(\"Open a Window\");\r\n      okButton.addActionListener(new ActionListener() {\r\n         public void actionPerformed(ActionEvent e) {\r\n            window.setVisible(true);\r\n            statusLabel.setText(\"A Window shown to the user.\"); \r\n         }\r\n      });\r\n      controlPanel.add(okButton);\r\n      mainFrame.setVisible(true);  \r\n   }\r\n\r\n   class MessageWindow extends JWindow{\r\n      private String message; \r\n\r\n      public MessageWindow(JFrame parent, String \r\n         message) { \r\n         super(parent);               \r\n         this.message = message; \r\n         setSize(300, 300);       \r\n         setLocationRelativeTo(parent);         \r\n      }\r\n\r\n      public void paint(Graphics g) \r\n      { \r\n         super.paint(g);\r\n         g.drawRect(0,0,getSize().width - 1,getSize().height - 1); \r\n         g.drawString(message,50,150); \r\n      } \r\n   }\r\n}\r\n<\/pre>\n<h2>4. Output<\/h2>\n<p>The Output of the code when executed will look like the one below.<\/p>\n<p><figure id=\"attachment_40806\" aria-describedby=\"caption-attachment-40806\" style=\"width: 827px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/09\/Jwindow_1.jpg\"><img decoding=\"async\" class=\"size-full wp-image-40806\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/09\/Jwindow_1.jpg\" alt=\"JwindowExample\" width=\"827\" height=\"698\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/09\/Jwindow_1.jpg 827w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/09\/Jwindow_1-300x253.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/09\/Jwindow_1-768x648.jpg 768w\" sizes=\"(max-width: 827px) 100vw, 827px\" \/><\/a><figcaption id=\"caption-attachment-40806\" class=\"wp-caption-text\">JwindowExample<\/figcaption><\/figure><br \/>\n<figure id=\"attachment_40807\" aria-describedby=\"caption-attachment-40807\" style=\"width: 862px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/09\/Jwindow_2.jpg\"><img decoding=\"async\" class=\"size-full wp-image-40807\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/09\/Jwindow_2.jpg\" alt=\"JwindowExample\" width=\"862\" height=\"696\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/09\/Jwindow_2.jpg 862w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/09\/Jwindow_2-300x242.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/09\/Jwindow_2-768x620.jpg 768w\" sizes=\"(max-width: 862px) 100vw, 862px\" \/><\/a><figcaption id=\"caption-attachment-40807\" class=\"wp-caption-text\">JwindowExample<\/figcaption><\/figure><\/p>\n<h2><a name=\"download\"><\/a>5. Download The Source Code<\/h2>\n<p>This was an example of creation of JAVA Window Example.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/09\/JwindowExample.zip\"><strong>JwindowExample<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A JWindow is a container that can be displayed anywhere on the user&#8217;s desktop. It does not have the title bar, window-management buttons, or other trimmings associated with a JFrame, but it is still a &#8220;first-class citizen&#8221; of the user&#8217;s desktop, and can exist anywhere on it. 1. Introduction The JWindow component contains a JRootPane &hellip;<\/p>\n","protected":false},"author":98,"featured_media":1204,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[],"class_list":["post-40741","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-swing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Java Swing JWindow Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"A JWindow is a container that can be displayed anywhere on the user&#039;s desktop. It does not have the title bar, window-management buttons, or other\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java Swing JWindow Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"A JWindow is a container that can be displayed anywhere on the user&#039;s desktop. It does not have the title bar, window-management buttons, or other\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/jyoti.jha.9256\" \/>\n<meta property=\"article:published_time\" content=\"2016-09-08T12:00:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jyoti Jha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jyoti Jha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/\"},\"author\":{\"name\":\"Jyoti Jha\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/7dcd033e37def0d21806e891845d89b7\"},\"headline\":\"Java Swing JWindow Example\",\"datePublished\":\"2016-09-08T12:00:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/\"},\"wordCount\":824,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"articleSection\":[\"swing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/\",\"name\":\"Java Swing JWindow Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"datePublished\":\"2016-09-08T12:00:53+00:00\",\"description\":\"A JWindow is a container that can be displayed anywhere on the user's desktop. It does not have the title bar, window-management buttons, or other\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"Bipartite Graph\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Desktop Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/desktop-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"swing\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/desktop-java\/swing\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Java Swing JWindow Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/7dcd033e37def0d21806e891845d89b7\",\"name\":\"Jyoti Jha\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Jyoti-Jha-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Jyoti-Jha-96x96.jpg\",\"caption\":\"Jyoti Jha\"},\"description\":\"Jyoti is a tech enthusiast and is an avid programmer. She holds a post graduation degree in (M.Tech) Computer Science Engineering from Thapar Univeristy, Patiala, India. Post her graduate studies, she has worked in Software companies such as SLK Software and Aricent, India as Software Engineer in various projects primarily in the field of Requirement analysis and design, implementing new algorithms in C++ and JAVA used in ISDN network and designing databases and. She is inquisitive about socio economic reforms as well as advancement in technical fronts and keep herself informed with TED talks and various blogs.\",\"sameAs\":[\"https:\/\/www.javacodegeeks.com\/\",\"https:\/\/www.facebook.com\/jyoti.jha.9256\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/jyoti-jha\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java Swing JWindow Example - Java Code Geeks","description":"A JWindow is a container that can be displayed anywhere on the user's desktop. It does not have the title bar, window-management buttons, or other","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:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/","og_locale":"en_US","og_type":"article","og_title":"Java Swing JWindow Example - Java Code Geeks","og_description":"A JWindow is a container that can be displayed anywhere on the user's desktop. It does not have the title bar, window-management buttons, or other","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"https:\/\/www.facebook.com\/jyoti.jha.9256","article_published_time":"2016-09-08T12:00:53+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","type":"image\/jpeg"}],"author":"Jyoti Jha","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Jyoti Jha","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/"},"author":{"name":"Jyoti Jha","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/7dcd033e37def0d21806e891845d89b7"},"headline":"Java Swing JWindow Example","datePublished":"2016-09-08T12:00:53+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/"},"wordCount":824,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","articleSection":["swing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/","name":"Java Swing JWindow Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","datePublished":"2016-09-08T12:00:53+00:00","description":"A JWindow is a container that can be displayed anywhere on the user's desktop. It does not have the title bar, window-management buttons, or other","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","width":150,"height":150,"caption":"Bipartite Graph"},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/desktop-java\/swing\/java-swing-jwindow-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Desktop Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/desktop-java\/"},{"@type":"ListItem","position":4,"name":"swing","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/desktop-java\/swing\/"},{"@type":"ListItem","position":5,"name":"Java Swing JWindow Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/7dcd033e37def0d21806e891845d89b7","name":"Jyoti Jha","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Jyoti-Jha-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Jyoti-Jha-96x96.jpg","caption":"Jyoti Jha"},"description":"Jyoti is a tech enthusiast and is an avid programmer. She holds a post graduation degree in (M.Tech) Computer Science Engineering from Thapar Univeristy, Patiala, India. Post her graduate studies, she has worked in Software companies such as SLK Software and Aricent, India as Software Engineer in various projects primarily in the field of Requirement analysis and design, implementing new algorithms in C++ and JAVA used in ISDN network and designing databases and. She is inquisitive about socio economic reforms as well as advancement in technical fronts and keep herself informed with TED talks and various blogs.","sameAs":["https:\/\/www.javacodegeeks.com\/","https:\/\/www.facebook.com\/jyoti.jha.9256"],"url":"https:\/\/examples.javacodegeeks.com\/author\/jyoti-jha\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/40741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/98"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=40741"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/40741\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1204"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=40741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=40741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=40741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}