Is there a simple way to open a web page within a GUI\'s JPanel?
If not, how do you open a web page with the computer\'s default web browser?
I am hoping for so
Please try below code :
import java.awt.Desktop;
import java.net.URI;
import java.net.URISyntaxExaception;
//below is the code
//whatvever the url is it has to have https://
Desktop d = Desktop.getDesktop();
try {
d.browse(new URI("http://google.com"));
} catch (IOException | URISyntaxException e2) {
e2.printStackTrace();
}