import java.awt.FlowLayout; import javax.swing.JFrame; import javax.swing.JLabel; /** A simple JFrame---similar to the one presented in the YouTube video "Java Programming Tutorial-51 GUI with JFrame by YouTube user "thenewboston". This class corresponds to the tuna class from the video. (http://www.youtube.com/watch?v=jUdIAgJ7JKo) @author Youtube user "thenewboston" @author Phill Conrad @see Youtube Link */ public class MyJFrame extends JFrame { private JLabel theLabel; public MyJFrame() { super("My Window Title"); // superclass constructor sets the title setLayout(new FlowLayout()); // default layout theLabel = new JLabel("This is my JFrame"); theLabel.setToolTipText("What up, Santa Barbara!?"); add(theLabel); } }