Building points in Java with interaction

I have a large number of data points, which are two-dimensional coordinates with non-integer values ​​(float). I am looking for a Java library that can help me build these points, allowing me to customize the size, color, and labels of the points. In addition, I would like the user to be able to interact with panning and zooming points, and I want to be able to capture KeyEvents from the user.

Processing is great for what I want, but I don't want to do everything from scratch. Is there a better solution?

Thanks in advance.

Edit: There are about 2k points.

+3
source share
3 answers

. , 2d- JFreechart, , .

, ( ) 1 ( ).

256 x 256 . ~ 350 , ( ), , 1024 x 1024 .

EDT, , - .

, JFreeChart.

+2

, .

, ? 1k, 100k, 1 ?

, 100 . . , , , .

+2

This example handles thousands of nodes easily.

GraphPanel() {
    ...
    Random rnd = new Random();
    for (int i = 0; i < 2000; i++) {
        Point p = new Point(rnd.nextInt(WIDE), rnd.nextInt(HIGH));
        nodes.add(new Node(p, 4, Color.blue, kind));
    }
}
+1
source

Source: https://habr.com/ru/post/1741816/


All Articles