Java provides a rich set of libraries to create a GUI in a platform independent way. One of the most popular libraries is Swing, of which JFrame is a class that is used extensively to create GUI.