ADS

8 Jframe Examples You Should Know - Swing

JFrame is a top-level container which is nothing more than a window with a title kafetaria and an optional sajian bar.
  1. Creating a JFrame in Swing Example - A Kickstart
    This example introduces the most common methods of JFrame class.
  2. Set background color in JFrame
    You cannot set the background for a JFrame just by using the setBackground() method. This example contains the single thing you need to set the background.
  3. Set background image in JFrame
    This example shows you how to set a background image in JFrame in three ways.
  4. 3 Ways to Set Icon image for JFrame
    An icon image is the one that appears in the top-left corner of a title bar. The example will teach you three simple ways to set icon.
  5. How to create a transparent JFrame in Swing
    Opaque frames are boring. Aren't they? This example shows how to create semi-transparent JFrame easily using a simple method.
  6. Create shaped transparent JFrame in Swing
    You can also set custom shape to a JFrame but it should be undecorated. This example contains JFrames of different shapes.
  7. Using setDefaultLookAndFeelDecorated() in JFrame
    This example contains how to set the default look and feel decorated so that the titlebar's appearance changes.
  8. Double titlebar for JFrame in Swing
    Creating a double titlebar is weird but can be done in a single line!
Well, I couldn't guarantee that these 8 JFrame examples are everything that you should know, but these cover about 95% of JFrame and give you a kickstart. There are a lot of other examples on JFrame in this blog, but as they are involved with event handling, and this is a written in an order, they aren't included.

Subscribe to receive free email updates:

ADS