Fish Eye Dock for J2Se

Tired of traditional menus on your J2SE application???

Then here is the solution.

FishEyeDock for J2SE

FishEyeDock
FishEyeDock

This is very attractive, flexible dock with the fish eye hover effect, which you can use on your J2SE application very easily.

Just add this as a library to your project and use. It’s that much simple..!!!

And it’s FREE and the source code is available inside the library itself…!!

Find the zipped jar file & the Java doc here.

Here is a sample code. (Make sure you added the FishEye library to the project.)

import gnomezgrave.fisheye.packages.FishEyeDock;
import java.awt.FlowLayout;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class DemoFishEye extends JFrame {

    public DemoFishEye() {
        super("Fish Eye Dock Demo");

        JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER));
        FishEyeDock d = new FishEyeDock(FishEyeDock.HORIZONTAL_ALIGNMENT);
        d.setDefaultSize(50);
        d.setAnimationSpeed(8);
        d.setImageZoomMode(FishEyeDock.ZOOM_MODE_SMOOTH);

        d.insert(new ImageIcon(getClass().getResource("/star.png")), "Star", null);
        d.insert(new ImageIcon(getClass().getResource("/settings.png")), "Settings", null);
        d.addSeperator();
        d.insert(new ImageIcon(getClass().getResource("/help.png")), "Help", null);

        panel.add(d);

        add(panel);

        setSize(600, 300);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    public static void main(String[] args) {
        new DemoFishEye().setVisible(true);
    }
}

Leave a Reply