GUI – Car

October 28th, 2014

Input using a GUI:

import javax.swing.JFrame; 
import javax.swing.JOptionPane;

public class PaneInput {
    
    public static void main(String[] args) 
    {
        // Construct a frame and show it
        JFrame frame = new JFrame(); 
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
        frame.setVisible(true);
        JOptionPane.showMessageDialog(frame, "Click OK to continue");

    }
}

Exercise:
1. Write a GUI application, YI_MyFlag.java and its JFrame class to draw your favorite flag.
Screen Shot 2014-10-28 at 1.51.02 PM

2. Write a GUI application, YI_Car.java and its JFrame class to draw a car like the one in the picture.
Screen Shot 2014-10-28 at 1.54.03 PM

3. Write a GUI application, YI_BullEye.java and its JFrame class to draw the picture.
Screen Shot 2014-10-28 at 1.56.35 PM

4. Write a GUI application, YI_OlympicRings.java and its JFrame class to draw famous rings.
Screen Shot 2014-10-28 at 1.56.51 PM