import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;

public class LoadApp extends JFrame implements ActionListener {

  // Visual components of the application.
  // You will probably need more state variables for threads,
  // timers, and the new type of panel to perfrom the animation on.

  private JButton loadButton, stopButton;
  private JTextField fileField;
  private JTextArea textArea;
  private JProgressBar bar;

  public LoadApp() {

    // Put your code to load the image here.


    // The visual component are constructed here. You will need
    // to construct yours as well. When you construct your animation
    // panel, make sure to set its size to 30x30 with the command
    // _____.setPreferredSize(new Dimension(30,30));

    loadButton = new JButton("LOAD");
    stopButton = new JButton("STOP");
    loadButton.addActionListener(this);
    stopButton.addActionListener(this);

    fileField = new JTextField(10);
    textArea = new JTextArea(10, 30);
    JScrollPane textPane = new JScrollPane(textArea);

    bar = new JProgressBar(0, 100);
    bar.setStringPainted(true);

    JPanel mainPanel = new JPanel(new BorderLayout());
    getContentPane().add(mainPanel);
    JPanel topPanel = new JPanel(new FlowLayout());
    JPanel lowerPanel = new JPanel(new FlowLayout());
    mainPanel.add(topPanel, "North");
    mainPanel.add(lowerPanel, "South");
    mainPanel.add(textPane, "Center");
    topPanel.add(loadButton);
    topPanel.add(new JLabel(" File: "));
    topPanel.add(fileField);
    lowerPanel.add(stopButton);
    lowerPanel.add(bar);

    // Add your animation panel to the lowerPanel
    
    }

public void actionPerformed(ActionEvent e) {
   
  // Put your code to handle the LOAD, STOP, and any timer
  // events here.

  }
 
 public static void main(String[] args) {
   LoadApp l = new LoadApp();
   l.setSize(300, 200);
   l.show();
   }     
 }
    



