Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3726 > unrolled thread
| Started by | "Lew" <lew@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:46 +0000 |
| Last post | 2011-04-27 15:46 +0000 |
| Articles | 1 — 1 participant |
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: Weird window close be "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:46 +0000
| From | "Lew" <lew@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:46 +0000 |
| Subject | Re: Weird window close be |
| Message-ID | <O8qdnajPSNie8_nVnZ2dnUVZ_sudnZ2d@comcast.com> |
To: comp.lang.java.gui Knute Johnson wrote: > So why wouldn't you construct a GUI in a GUI's constructor? That depends on your definition of "construction". The OP's code follows the idiom you're probably used to seeing, where the GUI is assembled, but that is not the same thing as object construction in the Java, or O-O sense. So let's be precise in our terminology, shall we, and ask why one wouldn't assemble the _GUI_ in the _object_'s constructor? The answer is what I said up front - it's a best practice not to do anything but construction (that's *object* construction, please avoid sophistry) in the object constructor. Properly speaking, the assembly of the GUI in an object, like the frame holder portrayed by both the OP's and my examples, should occur only after the object, the frame holder, is fully constructed. It was to show how one can translate that lip-service principle into practice that I presented the example. -- Lew --- * 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
Back to top | Article view | comp.lang.java.gui
csiph-web