Deciding Layouts
Deciding the layout is a very important step in Java GUI programming, just like solving an algorithm in normal programming. Layout decides how the components like labels, buttons, text fields etc are going to be displayed on a frame or window.
Some GUI can be designed using single panel with a single simple layout. Some GUI need to be broken down into smaller panels which have to be added to an outer panel. Each smaller panel can have its own layout.
The simplest layout is the flow layout. Flow layout produces output as a single row. So go for flow layout if you have only 3 or lesser components or if you want all the components in a single row.
Next is grid layout. As long as you can determine the rows and columns, you can use this layout. It is possible to use grid layout for most of the applications which you want to develop with a single panel. You can always use filler labels to occupy the empty spaces. So grid layout works fine in such cases.......
Join Now or Login to view the rest of this paper.
Approximate Word Count: 726
Approximate Pages: 3 (260 words per double-spaced page) |