I’m new to Java and Java Swing, and I’m creating an application that requires the presentation of web pages. I program for iOS a lot, and the simple solution here would be to load the page in a UIWebView. Is there an easy component for Java Swing? Or, is there an easy way to create something of the sort either in or outside of Swing?
I’m basically looking for something where you put in a URL, and a page loads in the application that looks like a normal page in a web browser.
If your Java program is a desktop application, the
browse()method ofjava.awt.Desktopaccepts aURIthat may be obtained form aURL. The feature was added in Java SE 6. It’s not embedded, but the user’s chosen browser may be more appealing.Addendum: See also How to open a URL in the default browser.