Greetings Faced the problem that you need to display a Google map in my Swing application. The only tasks are to install markers (albeit in a large volume) and move the camera to the markers. Perhaps in the future you will need to lay lines along the roads.


Searching the Internet, I found the following libraries to solve my problem:

JxMapViewer2 is a free library, but it is straining its "novelty" (I even saw mentions of 2009 even somewhere).

JxBrowser is a browser implementation through which everything can be done. However, it is paid for commercial projects, which is mine (of course, there is no money).


What are the alternative libraries for Swing'a, which will help to display the map (with markers and lines). Perhaps there are some other options for solving my problem?

PS If you have options only for JavaFX, offer in response. Then it is still rewritten under it. The answer is not accept, the question about Swing, but put a plus :).

    1 answer 1

    Once solved a similar problem with the display of Yandex maps. The most adequate that I managed to find is the SWT Browser , only it is not Swing, but SWT, but it works as it should. None of the components I tested on Swing display the page correctly.

    • This option will not work for me. The whole window is already on Swing, there are a lot of elements and the logic of filling elements is written. Under the card itself left one JPanel . But plus, of course, put. - Rostislav Dugin
    • Swing and SWT can be used together. - Igor Kudryashov
    • That is, you can use the "browser" as a component. - Rostislav Dugin
    • Using the Swing component in a SWT application doesn’t cause any problems or issues at all. And how to use SWT components in Swing JFrame / JPanel on the Internet is full of articles and recommendations, a little more complicated here, but completely solvable. - Igor Kudryashov
    • Just got to this task. Thank you very much, everything works great! It remains only to figure out how to remove everything that is possible from the card. As I understand it, it simply does not support dynamic loading (which starts with any action), so you cannot let the user move / click the map. - Rostislav Dugin