Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "Brandon McCombs" Subject: Re: Using panels Message-ID: <463c0fc2$0$5785$4c368faf@roadrunner.com> X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui In-Reply-To: References: Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 87 Date: Wed, 27 Apr 2011 15:34:07 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303918447 96.60.20.240 (Wed, 27 Apr 2011 10:34:07 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:34:07 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:1577 To: comp.lang.java.gui Knute Johnson wrote: > Kenneth P. Turvey wrote: >> On Fri, 04 May 2007 00:58:37 +0000, Andrew Thompson wrote: >> >>> Kenneth P. Turvey wrote: >>> . >>>> Unfortunately when I add a panel to the panel that sits in the split >>>> pane >>>> I don't see anything. >>> d >>> validate() or possibly repaint() might fix it, but.. >> >> I tried validate(). It doesn't help. Actually it might be in the >> included source. >>> .. >>>> I've put together a small example that uses two classes that shows the >>>> problem I'm having. I'll include the classes below. >>> They are not included, but ..*. >> >> Actually they are. Right below the signature. >>>> ...These were put >>>> together in NetBeans .. >>> "Don't blame us for your software" and.. >> >> NetBeans doesn't do anything strange with the classes. I checked. >> >>>> ..so they are a little bit more complex than necessary, but the added >>>> complexity can be ignored for the most part. >>> Why the heck should we 'ignore' the unnecessary complexity? Why, >>> instead, >>> do you not *remove* it so we never have to suffer the bandwidth, or take >>> (any) efforts to 'ignore' it ourselves! * If you actually need to post >>> code, please do us the courtesy of posting the *smallest* code example >>> that shows the problem. >> >> If you had looked at the classes you would have found them to be quite >> small, but complete. I added the warning more out of courtesy than >> out of >> necessity. >> You really should look at the code before spinning off on these kinds of >> tangents. Now we have two complete messages devoted to a few lines of >> extra code in the classes. Threads involving Andrew often spiral into conversations such as the one you just experienced. It is due to him complaining more about your presentation than just ignoring the fact it wasn't perfect or wasn't the way he would have done it and just helping w/o making such remarks. I believe the number of useful sentences he produces are overshadowed by how many non-useful sentences he produces. Wear a flak jacket so you are always prepared for his responses. > > I don't know what Andrew is using for a reader but in Thunderbird it is > almost impossible to read your code after the signature. That is a > TBird problem but... Using TBird 2.0 on a 19" screen the code is perfectly readable for me. Only 2 lines wrap (the setHorizontalGroup/setVerticalGroup lines within his initComponent() method). > > Your program is not as simple as it really needs to be but here is one > issue I've found. He shall be hanged for this abomination, then disemboweled. That will teach him. > > JPanel panel = new ChoreHeaderPanel(); > jPanel1.add(panel); > jPanel1.validate(); > > You are adding panel to jPanel1 but not to it's layout. Also I know > that the IDEs love GroupLayout but it is a pain to read and understand. > Why is panel not added in initComponents()? I think part of your > problem is calling add() on jPanel1 and not addComponent() on its > layout. And since we are talking about IDEs does it add the variable > declarations at the end of the class file or is that author's choice? > --- * 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