[Biojava-dev] A question on image-mapping with BioJava

Simon Helle Nielsen simonhn at cs.auc.dk
Wed Mar 10 06:14:00 EST 2004


Hello,
I've just begun using the biojava libaries and I have a small question.
How do I use the ImageMap interface in creating an applet?
Do you have an example on the use or some kind of tutorial?

What I want to do is to create some clickable hotspots on an image. If possible
with some kind of mouse-over effect.
I have made a prototype, but it doesn't seem to work:

    public void init() {
        URL dir = new URL("http://www.hotmail.com");
        Integer[] coordinates = {new Integer(30),new Integer(30),new Integer 
(300),new Integer(300)};
        ImageMap.ClientSide clientSide;
        ImageMap.HotSpot hS = new ImageMap.HotSpot(ImageMap.CIRCLE, dir,
coordinates);
        clientSide = new ImageMap.ClientSide("ClientSide");
        clientSide.addHotSpot(hS);
        ImageIcon ic = new ImageIcon(Bio.class.getResource("image.gif"));

        ...
}

thank you for your kind attention
Simon Helle Nielsen



More information about the biojava-dev mailing list