There are many options including commercial and open-source solutions.
JavaFX
JavaFX is available in Java 8-10. It provides the WebView
control that you can embed into your JavaFX application to display HTML and web pages. It's based on WebKit and renders HTML off-screen using Java Graphics API. It's lightweight. In Java 11 JavaFX is no longer available. It was extracted into a separate project — OpenJFX.
Runs on Windows, macOS, Linux.
JxBrowser
It's a commercial library. It provides the BrowserView
controls for Swing, JavaFX, SWT. It's based on Chromium, so the modern web pages look exactly as in Google Chrome. It supports two rendering modes: off-screen (lightweight) and hardware accelerated (GPU-accelerated, heavyweight).
Runs on Windows, macOS, Linux, Linux 64-bit ARM.
JCEF
It's an open-source library that represents Java port for CEF (C/C++). As far as I know it supports only Swing. It's based on Chromium, so the modern web pages look exactly as in Google Chrome.
Runs on Windows, macOS, Linux.
What's the difference?
In 2018 Sebastian Barth compared different Java libraries including JavaFX, JCEF, JxBrowser etc. and shared the results in the Browser Integration in Java Applications article.