javafx clickable image Map


Question

how can i implement clickable image map in javafx.when i click on the map i want to print that particular state name. The similar example found here

can it is possible in javafx?if yes.then...How? i used

imageView.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
            @Override
            public void handle(MouseEvent me) {
                Point p = MouseInfo.getPointerInfo().getLocation();

            mytext.setText(p.toString());
                System.out.println(p.toString());



            }
        });

on image but it not full my purpose.

1
3
6/13/2013 7:26:03 AM

I guess PuzzlePieces demo is a very best and helpful example for what you want to do. Have a look on the provided link.

https://bitbucket.org/shemnon/javafx-gradle/src/4f1f197a845d/Ensemble2/src/main/java/ensemble/samples/graphics/PuzzlePieces.java

2
6/14/2013 9:41:52 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon