You have to understand Java Layout Managers. There are a number of tutorials on java.sun.com regarding everything from the grid bag on. This is one of the most difficult aspects of GUI programming. And there is no panacea. However, if you're familiar with HTML, you'll see some striking similarities. In particular pre-CSS HTML. The Grid Bag acts much like an HTML table for instance.
Once you understand the layout managers, composing them becomes an art. How you compose them will be determined by: 1. Whether the user can resize the window 2. Which components will grow when the user resizes the window 3. Language issues. Meaning if you support multiple languages you have to deal with the fact that the equivalent German, Spanish or asian text will be much larger. Once you understand layout managers, you have different panes like split panes and other various contraptions that are used in most modern applications. Each have different behaviors by function. A split pane is, for instance, not like a flat panel of course. You must deal with the fact that the user may resize it and then determine how the components will live in it. Nearly any good book should cover the concepts. However, knowing how to yield a paintbrush does not make you Rembrandt. As of a year ago JBuilder was the only acceptable GUI designer, and even has wizards for the Grid Bag. NetBeans has something but it can actually generate non-compilable code which really turned me off to it. I love Eclipse but the last time I tried to do anything GUI with it I was enormously frustrated by lack of tools. I want to SEE what I'm doing. All in all Java has a lot to learn from VB in this area. -Andy On 9/1/03 1:57 PM, "Richard O. Hammer" <[EMAIL PROTECTED]> wrote: > How are component sizes determined in AWT and Swing? My limited > experience with GUI building has generally left me frustrated, because > there are many sizing mechanisms available which do not seem to work. > My attempts to set sizes routinely get ignored or overridden. > > I would like to believe that there is some design principle which has > been implemented in the Java GUI APIs, and that once I learn that > principle then I can know ahead of time which of the available sizing > mechanisms will work. But as it is, without knowing the principle, I > have to try and fail and try and fail and try ... > > I'd dream of finding an article named "How the sizes of Java GUI > components are determined". Can anybody point me to that? > > Thanks, > > Rich Hammer > > > _______________________________________________ > Juglist mailing list > [EMAIL PROTECTED] > http://trijug.org/mailman/listinfo/juglist_trijug.org -- Andrew C. Oliver http://www.superlinksoftware.com/poi.jsp Custom enhancements and Commercial Implementation for Jakarta POI http://jakarta.apache.org/poi For Java and Excel, Got POI? The views expressed in this email are those of the author and are almost definitely not shared by the Apache Software Foundation, its board or its general membership. In fact they probably most definitively disagree with everything espoused in the above email. _______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org
