Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2537

Re: repaint issue when co

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Subject Re: repaint issue when co
Message-ID <78bcbd0f9bac6@uwe> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <1190705690.856528.83200@g4g2000hsf.googlegroups.com>
References <1190705690.856528.83200@g4g2000hsf.googlegroups.com>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 46
Date Wed, 27 Apr 2011 15:39:42 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918782 96.60.20.240 (Wed, 27 Apr 2011 10:39:42 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:39:42 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:2537

Show key headers only | View raw


  To: comp.lang.java.gui
Chanchal wrote:
>Hi All,
>
>I have a component "JPResourceBox" which extends JPanel

What about JPWorkspacePanel?  I had to refactor that to a JPanel 
before I could get this code to work, and then I saw no 'flicker'.

OTOH, I think the root cause of that problem (as well as
potentially others you have not yet seen) is code like..

..
>        jButton1.setBounds(160, 210, 75, 23);
..
>        jp.setBounds(50,50,50,50);

Using these kind of conbstructs, you can expect problems.

Learn how to use layouts, and I am betting the problem
will vanish.
<http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html>

And as an aside, please consider posting SSCCE's, to 
help others to help you.  An SSCCE would either have
removed the reference to JPWorkspacePanel, or added
the code, and demoted JPResourceBox to 'default' access.

To make SSCCE's short (the first 'S') it is best to add
'package imports'* at the top of the code, then drop
use of the fully qualified name of each widget used.

* That makes for a good SSCCE, not 'good production 
code' - the two are different things.

-- 
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200709/1

---
 * 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 comp.lang.java.gui | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

repaint issue when compne "Chanchal" <chanchal@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
  Re: repaint issue when co "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
    Re: repaint issue when co "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
  Re: repaint issue when co "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000

csiph-web