Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2537
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: repaint issue when co |
| Message-ID | <78bcbd0f9bac6@uwe> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1190705690.856528.83200@g4g2000hsf.googlegroups.com> |
| Date | 2011-04-27 15:39 +0000 |
| Organization | TDS.net |
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 | Next — Previous in thread | Find similar | Unroll 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