<Swing Dev> JViewport fixlet
Roman Kennke
roman at kennke.org
Thu Oct 11 18:29:23 UTC 2007
Ping! Any opinion on this?
/Roman
Am Montag, den 24.09.2007, 12:47 +0200 schrieb Roman Kennke:
> I just stumbled over this code in JViewport.setViewPosition():
>
> if (view instanceof JComponent) {
> JComponent c = (JComponent)view;
> oldX = c.getX();
> oldY = c.getY();
> }
> else {
> Rectangle r = view.getBounds();
> oldX = r.x;
> oldY = r.y;
> }
>
> I think this special casing is not necessary anymore since JDK1.2.
> Attached is a patch to correct this.
>
> Cheers, Roman
>
--
http://kennke.org/blog/
More information about the swing-dev
mailing list