{"id":10282,"date":"2015-08-26T07:02:03","date_gmt":"2015-08-26T11:02:03","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/?p=10282"},"modified":"2015-08-24T08:48:07","modified_gmt":"2015-08-24T12:48:07","slug":"places-a-panel-holding-100-buttons-in-a-scrollpane","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=10282","title":{"rendered":"Places a Panel holding 100 buttons in a ScrollPane"},"content":{"rendered":"<pre>import java.applet.Applet;\r\nimport java.awt.*;\r\n\r\n\/** Places a Panel holding 100 buttons in a ScrollPane that is\r\n\u00a0*\u00a0 too small to hold it.\r\n\u00a0*\r\n\u00a0 *\/\r\n\r\npublic class ScrollPaneTest extends Applet {\r\n\u00a0 public void init() {\r\n\u00a0\u00a0\u00a0 setLayout(new BorderLayout());\r\n\u00a0\u00a0\u00a0 ScrollPane pane = new ScrollPane();\r\n\u00a0\u00a0\u00a0 Panel bigPanel = new Panel();\r\n\u00a0\u00a0\u00a0 bigPanel.setLayout(new GridLayout(10, 10));\r\n\u00a0\u00a0\u00a0 for(int i=0; i&lt;100; i++) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 bigPanel.add(new Button(\"Button \" + i));\r\n\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0 pane.add(bigPanel);\r\n\u00a0\u00a0\u00a0 add(pane, BorderLayout.CENTER);\r\n\u00a0 }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>import java.applet.Applet; import java.awt.*; \/** Places a Panel holding 100 buttons in a ScrollPane that is \u00a0*\u00a0 too small to hold it. \u00a0* \u00a0 *\/ public class ScrollPaneTest extends Applet { \u00a0 public void init() { \u00a0\u00a0\u00a0 setLayout(new BorderLayout()); \u00a0\u00a0\u00a0 ScrollPane pane = new ScrollPane(); \u00a0\u00a0\u00a0 Panel bigPanel = new Panel(); \u00a0\u00a0\u00a0 bigPanel.setLayout(new GridLayout(10, 10)); &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=10282\">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-10282","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":27217,"url":"http:\/\/bangla.sitestree.com\/?p=27217","url_meta":{"origin":10282,"position":0},"title":"Places a Panel holding 100 buttons in a ScrollPane #Programming Code Examples #Java\/J2EE\/J2ME #Advanced Swing","author":"Author-Check- Article-or-Video","date":"May 14, 2021","format":false,"excerpt":"import java.applet.Applet; import java.awt.*; \/** Places a Panel holding 100 buttons in a ScrollPane that is * too small to hold it. * *\/ public class ScrollPaneTest extends Applet { public void init() { setLayout(new BorderLayout()); ScrollPane pane = new ScrollPane(); Panel bigPanel = new Panel(); bigPanel.setLayout(new GridLayout(10, 10)); for(int\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":27000,"url":"http:\/\/bangla.sitestree.com\/?p=27000","url_meta":{"origin":10282,"position":1},"title":"Eight buttons: four each in two panels #Programming Code Examples #Java\/J2EE\/J2ME #AWT Components","author":"Author-Check- Article-or-Video","date":"May 7, 2021","format":false,"excerpt":"import java.applet.Applet; import java.awt.*; *************************** \/** Eight buttons: four each in two panels. * *\/ public class ButtonTest2 extends Applet { public void init() { String[] labelPrefixes = { \"Start\", \"Stop\", \"Pause\", \"Resume\" }; Panel p1 = new Panel(); for (int i=0; i<4; i++) { p1.add(new Button(labelPrefixes[i] + \" Thread1\"));\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":10333,"url":"http:\/\/bangla.sitestree.com\/?p=10333","url_meta":{"origin":10282,"position":2},"title":"Eight buttons: four each in two panels","author":"","date":"August 26, 2015","format":false,"excerpt":"mport java.applet.Applet; import java.awt.*; *************************** \/** Eight buttons: four each in two panels. * *\/ public class ButtonTest2 extends Applet { public void init() { String[] labelPrefixes = { \"Start\", \"Stop\", \"Pause\", \"Resume\" }; Panel p1 = new Panel(); for (int i=0; i<4; i++) { p1.add(new Button(labelPrefixes[i] + \" Thread1\"));\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":26948,"url":"http:\/\/bangla.sitestree.com\/?p=26948","url_meta":{"origin":10282,"position":3},"title":"Creates three radio buttons and illustrates handling #Programming Code Examples #Java\/J2EE\/J2ME #Basic Swing","author":"Author-Check- Article-or-Video","date":"May 6, 2021","format":false,"excerpt":"JRadioButtonTest.java Creates three radio buttons and illustrates handling ItemEvents in response to selecting a radio button. import javax.swing.JRadioButton; import javax.swing.ButtonGroup; import java.awt.*; import java.awt.event.*; import javax.swing.*; \/** *\/ public class JRadioButtonTest extends JPanel implements ItemListener { public JRadioButtonTest() { String[] labels = {\"Java Swing\",\"Java Servlets\", \"JavaServer Pages\"}; JRadioButton[] buttons =\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":10319,"url":"http:\/\/bangla.sitestree.com\/?p=10319","url_meta":{"origin":10282,"position":4},"title":"java Nested container where the top-level panels are positioned by hand","author":"","date":"August 26, 2015","format":false,"excerpt":"###################### ButtonCol.java Nested container where the top-level panels are positioned by hand ###################### import java.applet.Applet; import java.awt.*; \/** An example of a layout performed manually. The top-level \u00a0*\u00a0 panels are positioned by hand, after you determine the size \u00a0*\u00a0 of the applet. Since applets can't be resized in most \u00a0*\u00a0\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":10214,"url":"http:\/\/bangla.sitestree.com\/?p=10214","url_meta":{"origin":10282,"position":5},"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":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10282","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=10282"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10282\/revisions"}],"predecessor-version":[{"id":10283,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10282\/revisions\/10283"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10282"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}