Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #25415
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Is there something better than ComponentListener on Resized |
| Date | 2013-10-01 09:37 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <l2ej65$a46$1@dont-email.me> (permalink) |
| References | (2 earlier) <419a414e-356f-4d1c-ab98-cc6613081bcd@googlegroups.com> <l1lllj$plo$1@dont-email.me> <db2d0fc9-8ff0-4b7c-b7d8-cf987960c0f2@googlegroups.com> <l2c5cd$j32$2@dont-email.me> <a4d1b7c8-690a-4e9f-b5ca-88cd9bbe5dde@googlegroups.com> |
On 10/1/2013 8:39 AM, clusardi2k@aol.com wrote:
>> On Monday, September 30, 2013 11:29:16 AM UTC-4, Eric Sosman wrote:
>> Perhaps it's time to ask a question: Why do you think it's a good idea to
>> prevent the user from arranging his own screen as he pleases? Does your program
>> understand the user's needs and desires better than he himself does?
>
> I want to prevent the user from horizontally resizing the window beyond a certain width because (if I didn't) anything to the right of my two tables would be a a solid gray color of nothing.
>
> So, without the functionality that I want, if the user resizes the window it will look somthing like this exaggerated example:
>
> [][]||||||
>
> Where I represent a table with [] and gray solid areas are represented by |.
Maybe the user will find the blank gray expanses soothing?
In any event, they're of his own making -- and he can un-make
them again if he finds them objectionable. I sincerely doubt
that your efforts to protect him from his own faulty aesthetic
sense are worth while.
> The code that I've, unsuccessfully, tried to use is similar to the code here:
>
> http://docs.oracle.com/javase/tutorial/uiswing/layout/gridbag.html
Notice that this page is in a section whose title is
"Lesson: Layout Out Components *Within* a Container" [emphasis
mine]. You can control the sizes and layouts of things *inside*
a top-level container pretty closely, but the TLC itself is a
creature of the native windowing system, sized and positioned
(and decorated, hidden, revealed, ...) by that native system.
You're free to provide hints -- for example, the layout manager
of the frame's content pane can suggest the pane's dimensions --
but the native windowing system is not obliged to honor your
suggestions. (This is viewed as a Good Thing, because it gives
your desktop app a fighting chance of being usable on a teeny-
tiny phone screen, for example.)
To put it more simplistically: Java doesn't own "the screen"
and has no layout manager for it.
--
Eric Sosman
esosman@comcast-dot-net.invalid
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is there something better than ComponentListener on Resized clusardi2k@aol.com - 2013-09-20 12:43 -0700
Re: Is there something better than ComponentListener on Resized Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-09-20 17:16 -0400
Re: Is there something better than ComponentListener on Resized clusardi2k@aol.com - 2013-09-21 11:40 -0700
Re: Is there something better than ComponentListener on Resized Jeff Higgins <jeff@invalid.invalid> - 2013-09-21 22:46 -0400
Re: Is there something better than ComponentListener on Resized "clus@aol.com" <clusardi2k@aol.com> - 2013-09-30 08:08 -0700
Re: Is there something better than ComponentListener on Resized Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-09-30 11:29 -0400
Re: Is there something better than ComponentListener on Resized Jeff Higgins <jeff@invalid.invalid> - 2013-09-30 16:24 -0400
Re: Is there something better than ComponentListener on Resized Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-09-30 17:15 -0400
Re: Is there something better than ComponentListener on Resized "John B. Matthews" <nospam@nospam.invalid> - 2013-09-30 20:10 -0400
Re: Is there something better than ComponentListener on Resized Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-09-30 20:38 -0400
Re: Is there something better than ComponentListener on Resized Jeff Higgins <jeff@invalid.invalid> - 2013-09-30 22:16 -0400
Re: Is there something better than ComponentListener on Resized Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-09-30 22:32 -0400
Re: Is there something better than ComponentListener on Resized Jeff Higgins <jeff@invalid.invalid> - 2013-10-01 03:28 -0400
Re: Is there something better than ComponentListener on Resized Jeff Higgins <jeff@invalid.invalid> - 2013-10-01 03:41 -0400
Re: Is there something better than ComponentListener on Resized Arne Vajhøj <arne@vajhoej.dk> - 2013-10-01 20:04 -0400
Re: Is there something better than ComponentListener on Resized clusardi2k@aol.com - 2013-10-01 05:39 -0700
Re: Is there something better than ComponentListener on Resized Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-10-01 09:37 -0400
Re: Is there something better than ComponentListener on Resized "John B. Matthews" <nospam@nospam.invalid> - 2013-09-22 19:57 -0400
csiph-web