Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1965
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: layout problem |
| Message-ID | <74bf4d76c8d7c@uwe> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <468d09ce$0$25419$edfadb0f@dread11.news.tele.dk> |
| Date | 2011-04-27 15:36 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Simon [2610] wrote: >Hello, >Ive been away from Java development for a little over a year (got job as >.Net programmer) but ive just been handed a Java assignment, so i downloaded >the JBuilder 2007 trial to see if this was going to be my new IDE, but >im having a little trouble doing GUI, i need to create a plugin, and for >that i need to create a JPanel, so i created a JFrame so that i would have >something to launch my JPanel from and be able to see and test the plugin. I >created the JPanel with null layout, ... That is the start of the problems with this GUI. Do not use null layouts, unless defining a layout itself (I.E. calling setLayout(null) from within a LayoutManager/2 implementation). Within that layout, the logic will need to account for the different preferred sizes of components as they might appear under run-time environments that might vary in Java version, screen size and resolution, default font size/family, PLAF, OS.. I highly recommend the layout tutorial. http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html > ...and that worked out very fine, ... I do not find that claim very convincing, given you ended up here. >...but when i created .. A slight change and the 'layout' falls apart? That is to be expected with 'null' layouts, since they are not actual layouts as such - more 'luck and chance'. Do the layout tutorial - it should become more clear. -- Andrew Thompson http://www.athompson.info/andrew/ Message posted via JavaKB.com http://www.javakb.com/Uwe/Forums.aspx/java-gui/200707/1 --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Find similar | Unroll thread
layout problem "Simon [2610]" <simon.[2610]@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000 Re: layout problem "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000 Re: layout problem "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
csiph-web