Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is wrong with JScrollBar.setValue(...)????

27 views
Skip to first unread message

Corrine

unread,
Feb 17, 2003, 3:02:57 PM2/17/03
to
JScrollBar.setValue() occasionally but predictably (always in the same
circumstances, and in the same way) sets the value wrong. I have
checked, and the correct value is being passed to setValue(). Why in
the world is this happening, and how can I fix this?

In case it adds clarity to the problem, this is happening during a
zoom-in operation. In contrast, the zoom-out operation, which is
exactly analogous to the zoom-in operation, does JScrollBar.setValue()
correctly.

Thanks,

Corrine

darko...@gmail.com

unread,
May 19, 2013, 10:50:23 PM5/19/13
to
Corrine於 2003年2月18日星期二UTC+8上午4時02分57秒寫道:
i have the same problem, but still i can't find the solution !

John B. Matthews

unread,
May 20, 2013, 6:49:47 AM5/20/13
to
In article <6fca945b-bd9b-4387...@googlegroups.com>,
darko...@gmail.com wrote:

> Corrine�� 2003�N2��18������UTC+8���4��02�57�b����F
> > JScrollBar.setValue() occasionally but predictably (always in the
> > same circumstances, and in the same way) sets the value wrong. I
> > have checked, and the correct value is being passed to setValue().
> > Why in the world is this happening, and how can I fix this?
> >
> > In case it adds clarity to the problem, this is happening during a
> > zoom-in operation. In contrast, the zoom-out operation, which is
> > exactly analogous to the zoom-in operation, does
> > JScrollBar.setValue() correctly.
> >
> I have the same problem, but still I can't find the solution!

It's hard to say without a short example that reproduces the problem,
but the word _occasionally_ always make me think about possible
violations of the event dispatch thread.

<http://docs.oracle.com/javase/tutorial/uiswing/concurrency/initial.html>

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

Roedy Green

unread,
May 29, 2013, 3:16:57 AM5/29/13
to
On Sun, 19 May 2013 19:50:23 -0700 (PDT), darko...@gmail.com wrote,
quoted or indirectly quoted someone who said :

>> JScrollBar.setValue() occasionally but predictably (always in the same
>> circumstances, and in the same way) sets the value wrong. I have
>> checked, and the correct value is being passed to setValue()

I have never noticed a problem. See
http://mindprod.com/jgloss/jscrollpane.html

Take my SSCCE (Simple Self Contained Compilable Example) and see if
you can modify it to get it to fail.

You might want to dump all the relevant data about your pane and the
size information of the thing in it each time you call. It might be
the inner object lying about its size.

Also see http://mindprod.com/jgloss/swingthreads.html
--
Roedy Green Canadian Mind Products http://mindprod.com
Technological possibilities are irresistible to man.
If man can go to the moon, he will.
If he can control the climate, he will.
~ John von Neumann (born: 1903-12-28 died: 1957-02-08 at age: 53)
0 new messages