package Projeto;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class Frame extends JFrame{
  BorderLayout borderLayout1 = new BorderLayout();
  Panel panel = new Panel();
  Menu menu = new Menu();

  public Frame() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try  {
      jbInit();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }

  private void jbInit() throws Exception  {
    this.getContentPane().setLayout(borderLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame Title");
    panel.setBackground(Color.white);
    this.getContentPane().add(panel);
    this.getContentPane().add(menu,  BorderLayout.NORTH);
  }

  protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if(e.getID() == WindowEvent.WINDOW_CLOSING) {
      System.exit(0);
    }
  }
}