Re: grid bag layout problem
[post re-ordered for clarity]
Andrew Thompson wrote:
Please google top-posting before making more posts.
I would like to get that matter sorted, before proceeding.
(Hint: you are continuing to top-post.)
"gk" <srcjnu@gmail.com> wrote in message
news:1157483362.681838.67780@e3g2000cwe.googlegroups.com...
I hope you will come back to the discussion now and leave out this
thingie.
what i am doing here is, i am pressing "Reply" button in my Firefox
browser and posting you........anyway, can we please come back to the
discussion again ?
Some people will refuse to help you if you top-post. If you want to maximize
the number of helpful answers, avoid top posting. You should read the
following documents:
http://www.faqs.org/faqs/usenet/posting-rules/part1/
http://www.faqs.org/faqs/usenet/writing-style/part1/
http://www.faqs.org/faqs/usenet/primer/part1/
http://www.faqs.org/faqs/usenet/faq/part1/
but why the solution is like this ?
1 2 3 4
5 6 7
WHY NOT like below ?
1 2 3
4 5 6 7
OR WHY NOT like below
1 2 3 4 5 6
7
See http://java.sun.com/j2se/1.5.0/docs/api/java/awt/GridLayout.html
<quote>
When both the number of rows and the number of columns have been set to
non-zero values, either by a constructor or by the setRows and setColumns
methods, the number of columns specified is ignored. Instead, the number of
columns is determined from the specified number or rows and the total number
of components in the layout. So, for example, if three rows and two columns
have been specified and nine components are added to the layout, they will
be displayed as three rows of three columns. Specifying the number of
columns affects the layout only when the number of rows is set to zero.
</quote>
So in other words, if you lie about the number of components, GridLayout
is free to do whatever it wants, it seems.
- Oliver