Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #499
| From | "Oliver Wong" <oliver.wong@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: JScrollBar Repaint Qu |
| Message-ID | <HvBkh.62276$wZ4.897518@weber.videotron.net> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1166802036.257503.141510@42g2000cwt.googlegroups.com> |
| Date | 2011-04-27 15:27 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui
"mearvk" <mearvk@gmail.com> wrote in message
news:1166802036.257503.141510@42g2000cwt.googlegroups.com...
> For some reason the JScrollBar keeps setting its value to 3...
>
> So if I subclass JScrollBar (see code) and trap for this anomaly, I
> have kludged success.
> The call to JScrollBar's paint (in case it is pertinent) is coming via
> a repaint() call to a JDesktopPane. The JDesktopPane calls the
> JInternalFrame which call its subcomponents (of which the JScrollBar is
> a member). This is my understanding of the situation, at least..
>
> public void paint(Graphics g)
>
> {
>
> int curVal=super.getValue();
>
> if(curVal==3)
> {
> super.setValue(lastGoodValue);
> }
> else
> {
> lastGoodValue=curVal;
> }
>
> System.out.println("Painting with "+super.getValue());
> super.paint(g);
>
> }
>
> So, of course, I am left to wonder why this is happening.
>
> Any thoughts?
Post an SSCCE demonstrating the problem:
http://mindprod.com/jgloss/sscce.html
- Oliver
---
* 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