Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #513
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: JScrollBar Repaint Qu |
| Message-ID | <1167314014.094743.100580@48g2000cwx.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1167302019.406807.160780@73g2000cwn.googlegroups.com> |
| Date | 2011-04-27 15:27 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui
mearvk wrote:
> While working on some sandbox code to post here I was unable to get the
> same glitch to manifest itself.
...
> Working code looks like:
I doubt that the real problem is fixed*.
>
> public void paintComponent(Graphics g)
> {
> scrollPane.setSize(getWidth()-30,getHeight()-150);
> textField.setSize(getWidth()-30,25);
> textField.setLocation(10,getHeight()-130);
> send.setLocation(getWidth()/2,textField.getY()+35);
> cancel.setLocation(getWidth()/2-110,textField.getY()+35);
> super.paintComponent(g);
> }
This code is extremely fragile, and will might break
under the next Java version, on a different screen,
with different screensize, or under a different PLAF..
You should proceed with posting SSCCE's**, or at least
* figure why the behaviour suddenly disappears.
** <http://www.physci.org/codes/sscce>
Andrew T.
---
* 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 | Next in thread | Find similar
Re: JScrollBar Repaint Qu "mearvk" <mearvk@THRWHITE.remove-dii-this> - 2011-04-27 15:27 +0000
Re: JScrollBar Repaint Qu "Oliver Wong" <oliver.wong@THRWHITE.remove-dii-this> - 2011-04-27 15:27 +0000
Re: JScrollBar Repaint Qu "mearvk" <mearvk@THRWHITE.remove-dii-this> - 2011-04-27 15:27 +0000
Re: JScrollBar Repaint Qu "Oliver Wong" <oliver.wong@THRWHITE.remove-dii-this> - 2011-04-27 15:27 +0000
Re: JScrollBar Repaint Qu "mearvk" <mearvk@THRWHITE.remove-dii-this> - 2011-04-27 15:27 +0000
Re: JScrollBar Repaint Qu "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:27 +0000
Re: JScrollBar Repaint Qu "Oliver Wong" <oliver.wong@THRWHITE.remove-dii-this> - 2011-04-27 15:27 +0000
csiph-web