KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ca > commons > cbutil > CBViewport


1 package com.ca.commons.cbutil;
2
3 import javax.swing.*;
4 import java.awt.*;
5
6
7 /**
8  * JViewport appears to be more than usually stuffed...
9  * this class inherits from it, and lobotimises 'scrollRectToVisible'
10  * to prevent the bizarre automatically-scroll-to-the-bottom
11  * behaviour that was screwing up the browser...
12  *
13  * @author Chris Betts
14  * @version 1.0 22/8/99
15  * @see JViewport
16  */

17 public class CBViewport extends JViewport
18 {
19
20     /**
21      * Labotimised so that the bloody thing works. Something
22      * was calling this function and forcing the window to always
23      * be at the bottom; otherwise it doesn't seem to be needed :-)
24      * ... hopefully Sun will fix stuff up and we can go back to
25      * using JViewport some time...
26      *
27      * @param contentRect the Rectangle to display
28      */

29
30     public void scrollRectToVisible(Rectangle contentRect)
31     {
32         // code removed to protect the innocent
33
}
34 }
Popular Tags