{"id":10230,"date":"2015-08-25T07:13:29","date_gmt":"2015-08-25T11:13:29","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/?p=10230"},"modified":"2015-08-24T08:43:05","modified_gmt":"2015-08-24T12:43:05","slug":"demonstrates-the-use-of-a-jcolorchooser-which-presents-a-dialog-with-three-different-tabbed-panes-to-allow-the-user-to-select-a-color-preference-2","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=10230","title":{"rendered":"Demonstrates the use of a JColorChooser which presents a dialog with three different tabbed panes to allow the user to select a color preference"},"content":{"rendered":"<p style=\"text-align: justify;\">Demonstrates the use of a JColorChooser which presents a dialog with three different tabbed panes to allow the user to select a color preference. The dialog returns a Color object based on the user&#8217;s selection or null if the user entered Cancel.<\/p>\n<p>&nbsp;<\/p>\n<pre>import java.awt.*;\r\nimport java.awt.event.*;\r\nimport javax.swing.*;\r\n\r\n\/** Simple example illustrating the use of internal frames. \r\n\u00a0*\r\n\u00a0*\u00a0\u00a0 *\/\r\n\r\npublic class JInternalFrames extends JFrame {\r\n\u00a0 public static void main(String[] args) {\r\n\u00a0\u00a0\u00a0 new JInternalFrames();\r\n\u00a0 }\r\n\r\n\u00a0 public JInternalFrames() {\r\n\u00a0\u00a0\u00a0 super(\"Multiple Document Interface\");\r\n\u00a0\u00a0\u00a0 WindowUtilities.setNativeLookAndFeel();\r\n\u00a0\u00a0\u00a0 addWindowListener(new ExitListener());\r\n\u00a0\u00a0\u00a0 Container content = getContentPane();\r\n\u00a0\u00a0\u00a0 content.setBackground(Color.white);\r\n\u00a0\u00a0\u00a0 JDesktopPane desktop = new JDesktopPane();\r\n\u00a0\u00a0\u00a0 desktop.setBackground(Color.white);\r\n\u00a0\u00a0\u00a0 content.add(desktop, BorderLayout.CENTER);\r\n\u00a0\u00a0\u00a0 setSize(450, 400);\r\n\u00a0\u00a0\u00a0 for(int i=0; i&lt;5; i++) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 JInternalFrame frame\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = new JInternalFrame((\"Internal Frame \" + i),\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 true, true, true, true);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 frame.setLocation(i*50+10, i*50+10);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 frame.setSize(200, 150);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 frame.setBackground(Color.white);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 frame.setVisible(true);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 desktop.add(frame);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 frame.moveToFront();\r\n\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0 setVisible(true);\r\n\u00a0 }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Demonstrates the use of a JColorChooser which presents a dialog with three different tabbed panes to allow the user to select a color preference. The dialog returns a Color object based on the user&#8217;s selection or null if the user entered Cancel. &nbsp; import java.awt.*; import java.awt.event.*; import javax.swing.*; \/** Simple example illustrating the use &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=10230\">Continue reading<\/a><\/p>\n","protected":false},"author":130,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1417,1424],"tags":[706,308,285],"class_list":["post-10230","post","type-post","status-publish","format-standard","hentry","category-code-programming-samples--","category-javaj2eej2me","tag-code","tag-java","tag-285","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":10228,"url":"http:\/\/bangla.sitestree.com\/?p=10228","url_meta":{"origin":10230,"position":0},"title":"Demonstrates the use of a JColorChooser which presents a dialog with three different tabbed panes to allow the user to select a color preference","author":"","date":"August 25, 2015","format":false,"excerpt":"Demonstrates the use of a JColorChooser which presents a dialog with three different tabbed panes to allow the user to select a color preference. The dialog returns a Color object based on the user's selection or null if the user entered Cancel. import java.awt.*; import java.awt.event.*; import javax.swing.*; \/** Simple\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26916,"url":"http:\/\/bangla.sitestree.com\/?p=26916","url_meta":{"origin":10230,"position":1},"title":"Demonstrates the use of a JColorChooser which presents a dialog with three different tabbed panes to allow the user to select a color preference #Programming Code Examples #Java\/J2EE\/J2ME #Basic Swing","author":"Author-Check- Article-or-Video","date":"May 5, 2021","format":false,"excerpt":"Demonstrates the use of a JColorChooser which presents a dialog with three different tabbed panes to allow the user to select a color preference. The dialog returns a Color object based on the user's selection or null if the user entered Cancel. import java.awt.*; import java.awt.event.*; import javax.swing.*; \/** Simple\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26918,"url":"http:\/\/bangla.sitestree.com\/?p=26918","url_meta":{"origin":10230,"position":2},"title":"Demonstrates the use of a JColorChooser which presents a dialog with three different tabbed panes to allow the user to select a color preference #Programming Code Examples #Java\/J2EE\/J2ME #Basic Swing","author":"Author-Check- Article-or-Video","date":"May 5, 2021","format":false,"excerpt":"Demonstrates the use of a JColorChooser which presents a dialog with three different tabbed panes to allow the user to select a color preference. The dialog returns a Color object based on the user's selection or null if the user entered Cancel. import java.awt.*; import java.awt.event.*; import javax.swing.*; \/** Simple\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10214,"url":"http:\/\/bangla.sitestree.com\/?p=10214","url_meta":{"origin":10230,"position":3},"title":"Basic Swing Details","author":"","date":"August 25, 2015","format":false,"excerpt":"WindowUtilities.java Utility class that simplifies creating a window and setting the look and feel. ExitListener.java A WindowListener with support to close the window. JAppletExample.java A simple applet (JApplet) created in Swing. Illustrates setting the look and feel, adding components to the content pane, and changing the layout to FlowLayout (default\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26896,"url":"http:\/\/bangla.sitestree.com\/?p=26896","url_meta":{"origin":10230,"position":4},"title":"Basic Swing Details #Programming Code Examples #Java\/J2EE\/J2ME #Basic Swing","author":"Author-Check- Article-or-Video","date":"May 4, 2021","format":false,"excerpt":"* WindowUtilities.java Utility class that simplifies creating a window and setting the look and feel. * ExitListener.java A WindowListener with support to close the window. * JAppletExample.java A simple applet (JApplet) created in Swing. Illustrates setting the look and feel, adding components to the content pane, and changing the layout\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10341,"url":"http:\/\/bangla.sitestree.com\/?p=10341","url_meta":{"origin":10230,"position":5},"title":"A Frame that uses the Confirm dialog to verify quit","author":"","date":"August 27, 2015","format":false,"excerpt":"ConfirmTest.java **************** import java.awt.*; import java.awt.event.*; \/** A Frame that uses the Confirm dialog to verify that \u00a0*\u00a0 users really want to quit. \u00a0* \u00a0 public class ConfirmTest extends Frame { \u00a0 public static void main(String[] args) { \u00a0\u00a0\u00a0 new ConfirmTest(); \u00a0 } \u00a0 public ConfirmTest() { \u00a0\u00a0\u00a0 super(\"Confirming QUIT\");\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/130"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10230"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10230\/revisions"}],"predecessor-version":[{"id":10231,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10230\/revisions\/10231"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10230"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}