Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2806 > unrolled thread
| Started by | "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:41 +0000 |
| Last post | 2011-04-27 15:41 +0000 |
| Articles | 9 — 5 participants |
Back to article view | Back to comp.lang.java.gui
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Screen Resolution "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Screen Resolution "Abdelali Adil" <abdelali.adil@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Screen Resolution "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Screen Resolution "Abdelali Adil" <abdelali.adil@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Screen Resolution "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Screen Resolution "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Screen Resolution "Abdelali Adil" <abdelali.adil@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Screen Resolution "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Screen Resolution "Karsten Lentzsch" <karsten.lentzsch@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
| From | "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:41 +0000 |
| Subject | Re: Screen Resolution |
| Message-ID | <gtSdnUux9J-GGtnanZ2dnUVZ_jGdnZ2d@wavecable.com> |
To: comp.lang.java.gui Abdelali Adil wrote: > > Andrew Thompson wrote: >> I agree about the interesting part. I am a strong advocate of the >> fact that if there is any complexity whatsoever in a custom layout, >> it should be encapsulated (written, coded) in a LayoutManager. >> >> ( Definining a custom layout manager is a lot easier than most >> people think. ) >> >> OTOH - a lot of the things people expect can only be provided by a >> custom LM (or a null LM) can coded using Sun standard >> LMs, just by using 'nested layouts'. > > You 're right, but in my case it's only a prototype. > If its only a prototype, what about using a GUI builder? In any case, you don't really care about screen resolution as much as you care about component size, correct? Look at ComponentListener, it can receive an event when the component changes size. (assuming you add it to the correct component :-) ) -- Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/> --- * 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
[toc] | [next] | [standalone]
| From | "Abdelali Adil" <abdelali.adil@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:41 +0000 |
| Message-ID | <5qlh8gF10k0esU1@mid.dfncis.de> |
| In reply to | #2806 |
To: comp.lang.java.gui Daniel Pitts wrote: >If its only a prototype, what about using a GUI builder? I used a GUI builder and i used null LM. --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:41 +0000 |
| Message-ID | <474593fd$0$13925$fa0fcedb@news.zen.co.uk> |
| In reply to | #2807 |
To: comp.lang.java.gui Abdelali Adil wrote: > Daniel Pitts wrote: > > >If its only a prototype, what about using a GUI builder? > > I used a GUI builder and i used null LM. But why? I use a layout manager for even the simplest prototypes. In a spirit of learning, I'd be really interested in hearing more about circumstances where a layout manager doesn't make development faster (and the prototype more reliable, especially if the screen resolution changes). Please explain. --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "Abdelali Adil" <abdelali.adil@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:41 +0000 |
| Message-ID | <5qnp2uF10flebU1@mid.dfncis.de> |
| In reply to | #2808 |
To: comp.lang.java.gui RedGrittyBrick wrote: > Abdelali Adil wrote: >> Daniel Pitts wrote: >> >> >If its only a prototype, what about using a GUI builder? >> >> I used a GUI builder and i used null LM. > > But why? > > I use a layout manager for even the simplest prototypes. In a spirit of > learning, I'd be really interested in hearing more about circumstances > where a layout manager doesn't make development faster (and the prototype > more reliable, especially if the screen resolution changes). > > Please explain. Well, this GUI was quite complex therefor Gridbag LM would be the solution, but as maybe you know Gridbag LM isn't only one of the most powerfull LM but also one of most complex LM and you will need much more time as if you use GUI builder with null Layout. --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:41 +0000 |
| Message-ID | <7ba3ed9281666@uwe> |
| In reply to | #2809 |
To: comp.lang.java.gui Abdelali Adil wrote: >>> >If its only a prototype, what about using a GUI builder? >>> >[quoted text clipped - 8 lines] >> >> Please explain. > >Well, this GUI was quite complex therefor Gridbag LM would be the solution, >but as maybe you know >Gridbag LM isn't only one of the most powerfull LM but also one of most >complex LM and you will need much more time as if you use GUI builder with >null Layout. But you spend much more time trying to figure how to attach ComponentListener(s) or monitoring a 'DPI change' rather than simply allowing a LayoutManager (or LayoutManager*s* in the case of a nested layout) to figure how to distribute the available space amongst the components. I did an experiment since this thread started, changing my 96 DPI Widows computer to 120 DPI. Every one of my GUIs (using standard J2SE Layouts) looks entirely logical to the new DPI, without any need of 'knowing' either the screen size, or DPI. Note that this 'logical' look is more a testament to the clever people that designed the layouts, than anything to do with me - I just invoked their (well designed) logic in my GUIs. -- Andrew Thompson http://www.physci.org/ Message posted via http://www.javakb.com --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:41 +0000 |
| Message-ID | <7ba3fb6993c61@uwe> |
| In reply to | #2810 |
To: comp.lang.java.gui Andrew Thompson wrote: >>>> >If its only a prototype, what about using a GUI builder? Can you give us an idea of what this GUI is supposed to look like*? I (almost) guarantee it is possible to code it using standard J2SE Layouts. *One tricky aspect is that it is important for us to understand how 'space' in the GUI will be 'redistributed' when the GUI is resized. For example, what componets get 'the rest of the space' when there is extra space to give to the GUI? -- Andrew Thompson http://www.physci.org/ Message posted via JavaKB.com http://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/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
[toc] | [prev] | [next] | [standalone]
| From | "Abdelali Adil" <abdelali.adil@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:41 +0000 |
| Message-ID | <5qod39F10sn0jU1@mid.dfncis.de> |
| In reply to | #2811 |
To: comp.lang.java.gui Andrew Thompson wrote > Andrew Thompson wrote: >>>>> >If its only a prototype, what about using a GUI builder? > > Can you give us an idea of what this GUI is supposed > to look like*? I (almost) guarantee it is possible to code > it using standard J2SE Layouts. You are right , you can do the almost of things by combining many LMs, But in my case it was only a matter of time. --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:41 +0000 |
| Message-ID | <4746eaa6$0$13932$fa0fcedb@news.zen.co.uk> |
| In reply to | #2809 |
To: comp.lang.java.gui Abdelali Adil wrote: > > RedGrittyBrick wrote: > >> Abdelali Adil wrote: >> >>> I used a GUI builder and i used null LM. >> >> But why? >> >> I use a layout manager for even the simplest prototypes. In a spirit >> of learning, I'd be really interested in hearing more about >> circumstances where a layout manager doesn't make development faster >> (and the prototype more reliable, especially if the screen resolution >> changes). >> >> Please explain. > > > Well, this GUI was quite complex therefor Gridbag LM would be the > solution, but as maybe you know > Gridbag LM isn't only one of the most powerfull LM but also one of most > complex LM and you will need much more time as if you use GUI builder > with null Layout. I agree GridBagLayout is complex (and quirky). That is why I often use * Nested layouts (e.g. BoxLayout inside BoxLayout) * MigLayout. More powerful than GridBagLayout, easier, free and concise. A simple example from http://www.miglayout.com/QuickStart.pdf +-----+-------------+-----+ |comp1| |comp3| +-----+ comp2 +-----+ |comp4| |comp5| +-----+--------+----+-----+ |comp6| comp7 | | | +-----+--------+----+-----+ panel = new JPanel(new MigLayout()); panel.add(comp1); panel.add(comp2, "span 2 2"); panel.add(comp3, "wrap"); panel.add(comp4); panel.add(comp5); panel.add(comp6); panel.add(comp7); I doubt I could do that as easily using a null layout. YMMV Sizes can be specified in units that take DPI into account (points ,cm, inches etc) It also has "logical pixels" which caters for varying sizes of "normal" font on the platform. You can specify which components grow to grab available space as the container is resized (weighted, grouped), alignment, insets, equalize button sizes, etc etc etc. It can mimic flowlayout and borderlayout as well as grid oriented layouts. It can also do absolute positioning, or a mix! I added MigLayout's source to my workspace, so using and deploying is , for me, the same as for any standard layout manager. Note: I'm not associated with Mig in any way other than as a happy user of MigLayout. --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "Karsten Lentzsch" <karsten.lentzsch@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:41 +0000 |
| Message-ID | <fie12f$7uq$01$1@news.t-online.com> |
| In reply to | #2809 |
To: comp.lang.java.gui Abdelali Adil wrote: > [...] > Gridbag LM isn't only one of the most powerfull LM but also one of most > complex LM and you will need much more time as if you use GUI builder > with null Layout. Although GridBagLayout is complex, it is one of the weaker Java layout managers. Since this has been mentioned in this thread: I've found in layout courses that most developers end up with better design if they use a flat grid-based layout and avoid nesting. There are design-cases where nesting makes sense; as a general guideline it should be avoided in Swing, because otherwise you loose layout constraints required for aligning (sub-)elements. Swing LMs do not provide inter-panel layout constraints. I've also found in the layout courses that many developers face problems with building a mental layout when reading layout code that mixes the design specification with the panel building. That's the case for GridBagLayout and how MIGLayout is advertised. If you have 50 components, even the last constraint can change the number of columns. In contrast TableLayout has invented a style where the developer can understand the layout specification by reading a few lines of code. That's the fixed part. The longer panel building part does not affect the overall design (columns, often rows). I provide a free and open layout system that aims to address the needs of developers as well as the requirements for useable visual tools, the JGoodies Forms. It has been designed to make it easier to find a layout (it's grid based), and to implement with hand or tool. The JGoodies FormLayout has visual plugins for Eclipse, Netbeans and is integrated with IDEA. Here's more information: http://www.jgoodies.com/freeware/forms/index.html -Karsten Lentzsch --- * 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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.gui
csiph-web