[Biojava-l] Scrolling in TranslatedSequencePanel

Kalle Näslund kalle.naslund at genpat.uu.se
Tue May 24 07:17:52 EDT 2005


Jolyon Holdstock wrote:

>Hi,
>
> 
>
>I am using a TranslatedSequencePanel (TSP) to display sequence with
>associated data and it all looks good (thank you BioJava). I want to add
>more tracks to the TSP but the height of the rendered image now becomes
>bigger than the space that it fits in.  I have implemented scrolling
>along the sequence OK but cannot work out how to do this for the
>vertical view. 
>
> 
>
>If anybody has had some success with this I would be grateful for any
>help.
>
>  
>
The simple approach i use is to toss the TranslatedSequencePanel inside 
JScrollPane.
The use of JScrollPane is the common way to get scrollability in Swing. 
In order to get
the behaviour most people want you most likely should set 
HorizontalScrollBarPolicy
to NEVER and VerticalScrollBarPoly to AS_NEEDED.

/Kalle


More information about the Biojava-l mailing list