zoom (setViewPosition) not working for java 1.4.2

I created a JScollPane with a RenderableDisplay.

I programmed a zoom function by adding a mouse

listener to the RenderableDisplay. Right click..

zoom in..left click..zoom out.

All works fine with java 1.3.X. Nothing happens

with java 1.4.X. I traced the problem to the setViewPosition method of the JViewport class.

I unzipped the source and found the following

differences in the setViewPosition routines..

Java 1.3.04

//Force a repaint of the whole component

//on the next call to paint

repaintAll = windowBlitPaint(g);

Java 1.4.X

//Repaint the complete component if the blit

//succeeded and needsRepaintAfterBlit returns true

repaintAll = (WindowBlitPaint(g) && needsRepaintAfterBlit())

I unjared dt.jar and went to change the 1.4 source

to match the 1.3.04 code. I recompiled and rejared and

placed the new dt.jar in lib and made sure my CLASSPATH

pointed there. When I went to recompile my source code

that referenced the setViewPosition method I got:

/JAVA/j2sdk1.4.2_01/lib/dt.jar(javax/swing/UIManager.java):90: class UIManager is public, should be declared in a file named UIManager.java

..and similar messages for each file under javax/swing

I first need to be able to recompile the swing with

a change to JViewport.java and see if the old code

would fix my problem. I recreated dt.jar but for

some reason putting that in my CLASSPATH doesn't work.

(as mentioned with error above). Does anyone know

what I need to do to avoid the above compile errors?

Second, I need to figure why the code needsRepaintAfterBlit() is returning false for my application.

Any help will be appreciated...

[1792 byte] By [garyc12345a] at [2007-9-30 2:20:10]
# 1
Why not investigate whey the "needsRepaintAfterBlit()" method is apparently coming out false in jdk 1.4? It seems like that would be the next step. Recompiling the jre should be an absolute last resort in my opinion.
Josh_Castagnoa at 2007-7-16 13:29:13 > top of Java-index,Archived Forums,Swing...
# 2

Well, in order to "investigate whey the "needsRepaintAfterBlit()" method is apparently coming out false " I need to run my program in debug. In

order to look at values at breakpoints in a debugger

I need to compile with debug on...which gets me back

to my very first problem of needing to recompile the

swing.

I found the solution was to change the JViewport.java

in the jre/lib/rt.jar and then run.

garyc12345a at 2007-7-16 13:29:13 > top of Java-index,Archived Forums,Swing...