Re: JScrollBar Repaint Question
- From: "mearvk" <mearvk@xxxxxxxxx>
- Date: 22 Dec 2006 07:40:36 -0800
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?
Mearvk
.
- Follow-Ups:
- Re: JScrollBar Repaint Question
- From: Oliver Wong
- Re: JScrollBar Repaint Question
- References:
- JScrollBar Repaint Question
- From: mearvk
- JScrollBar Repaint Question
- Prev by Date: Changing the font of tool tip text
- Next by Date: Re: Changing the font of tool tip text
- Previous by thread: JScrollBar Repaint Question
- Next by thread: Re: JScrollBar Repaint Question
- Index(es):