java - Inconsistent JFrame Size -
my window component looks cropped. size when run , size in properties (minimumsize , preferredsize) different. happened both free design or absolute design. done these netbeans 7.1.2. what problem of this? know usual problem this? bug of matisse? don't know happen. how can solve this? sorry mistakes. give thanks you.
i don't know error code frame's code:
jbutton4.seticon(new javax.swing.imageicon(getclass().getresource("/otodidak/gambar/logomati.png"))); // noi18n jbutton4.settooltiptext("tutup otodidak"); jbutton4.addactionlistener(new java.awt.event.actionlistener() { public void actionperformed(java.awt.event.actionevent evt) { jbutton4actionperformed(evt); } }); setdefaultcloseoperation(javax.swing.windowconstants.dispose_on_close); settitle("otodidak"); setalwaysontop(true); setlocationbyplatform(true); setpreferredsize(new java.awt.dimension(787, 410)); setresizable(false); getcontentpane().setlayout(new org.netbeans.lib.awtextra.absolutelayout()); getcontentpane().add(jseparator1, new org.netbeans.lib.awtextra.absoluteconstraints(48, 53, 689, -1)); btback.seticon(new javax.swing.imageicon(getclass().getresource("/otodidak/gambar/backlogo2.png"))); // noi18n btback.settooltiptext("kembali"); btback.addmouselistener(new java.awt.event.mouseadapter() { public void mouseclicked(java.awt.event.mouseevent evt) { btbackmouseclicked(evt); } }); btback.addactionlistener(new java.awt.event.actionlistener() { public void actionperformed(java.awt.event.actionevent evt) { btbackactionperformed(evt); } }); getcontentpane().add(btback, new org.netbeans.lib.awtextra.absoluteconstraints(224, 340, 130, -1)); jbutton5.seticon(new javax.swing.imageicon(getclass().getresource("/otodidak/gambar/logomati.png"))); // noi18n jbutton5.settooltiptext("tutup otodidak"); jbutton5.addactionlistener(new java.awt.event.actionlistener() { public void actionperformed(java.awt.event.actionevent evt) { jbutton5actionperformed(evt); } }); getcontentpane().add(jbutton5, new org.netbeans.lib.awtextra.absoluteconstraints(718, 358, 46, -1)); jlabel1.seticon(new javax.swing.imageicon(getclass().getresource("/otodidak/gambar/synapticwvdial.png"))); // noi18n getcontentpane().add(jlabel1, new org.netbeans.lib.awtextra.absoluteconstraints(388, 65, 348, 264)); btnext.seticon(new javax.swing.imageicon(getclass().getresource("/otodidak/gambar/nextlogo2.png"))); // noi18n btnext.settooltiptext("lanjut"); btnext.addmouselistener(new java.awt.event.mouseadapter() { public void mouseclicked(java.awt.event.mouseevent evt) { btnextmouseclicked(evt); } }); getcontentpane().add(btnext, new org.netbeans.lib.awtextra.absoluteconstraints(396, 340, 130, 48)); jlabel10.setfont(new java.awt.font("ubuntu", 1, 48)); // noi18n jlabel10.settext("1"); getcontentpane().add(jlabel10, new org.netbeans.lib.awtextra.absoluteconstraints(48, 68, 36, 40)); jlabel2.setfont(new java.awt.font("ubuntu", 0, 24)); // noi18n jlabel2.settext("instal aplikasi wvdial"); getcontentpane().add(jlabel2, new org.netbeans.lib.awtextra.absoluteconstraints(90, 80, -1, 24)); getcontentpane().add(jseparator2, new org.netbeans.lib.awtextra.absoluteconstraints(50, 116, 216, 18)); jlabel3.setfont(new java.awt.font("ubuntu", 0, 16)); // noi18n jlabel3.settext("1) buka synaptic."); getcontentpane().add(jlabel3, new org.netbeans.lib.awtextra.absoluteconstraints(56, 132, 368, 26)); jlabel4.setfont(new java.awt.font("ubuntu", 0, 16)); // noi18n jlabel4.settext("3) klik kanan wvdial, pilih mark installation. "); getcontentpane().add(jlabel4, new org.netbeans.lib.awtextra.absoluteconstraints(56, 207, 346, -1)); jlabel5.setfont(new java.awt.font("ubuntu", 0, 16)); // noi18n jlabel5.settext("2) ketik wvdial. "); getcontentpane().add(jlabel5, new org.netbeans.lib.awtextra.absoluteconstraints(56, 170, 346, -1)); jlabel6.setfont(new java.awt.font("ubuntu", 0, 16)); // noi18n jlabel6.settext("4) biarkan synaptic menginstalkan wvdial. "); getcontentpane().add(jlabel6, new org.netbeans.lib.awtextra.absoluteconstraints(56, 244, 346, -1)); jlabel7.setfont(new java.awt.font("ubuntu", 0, 16)); // noi18n jlabel7.settext("catatan: net harus menyala."); getcontentpane().add(jlabel7, new org.netbeans.lib.awtextra.absoluteconstraints(58, 292, 298, 22)); lbjudul.setfont(new java.awt.font("dialog", 1, 24)); // noi18n lbjudul.setforeground(new java.awt.color(254, 254, 254)); lbjudul.sethorizontalalignment(javax.swing.swingconstants.center); lbjudul.settext("cara menginstal smartfren ac682"); getcontentpane().add(lbjudul, new org.netbeans.lib.awtextra.absoluteconstraints(117, 12, 578, -1)); jpanel1.setbackground(new java.awt.color(1, 1, 1)); getcontentpane().add(jpanel1, new org.netbeans.lib.awtextra.absoluteconstraints(0, -2, 788, 50)); pack();
usually setpreferredsize should work layout managers. layout manager utilize preferred, minimum , maximum sizes of components, , using setsize , setlocation position components according layout's rules.
however if seek position components in locations big fit layout manager automatically resize fit component , may not stick dimensions set in setpreferredsize.
java swing netbeans jframe layout-manager
No comments:
Post a Comment