public Frame() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 631, 366);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		JPanel panel = new JPanel();
		contentPane.add(panel, BorderLayout.WEST);
		
		JPanel panel_1 = new JPanel();
		contentPane.add(panel_1, BorderLayout.NORTH);
		
		JTextPane txtpnAdministradorDeTareas = new JTextPane();
		txtpnAdministradorDeTareas.setText("Administrador de tareas");
		panel_1.add(txtpnAdministradorDeTareas);
		
		JPanel panel_2 = new JPanel();
		contentPane.add(panel_2, BorderLayout.EAST);
		
		JPanel panel_3 = new JPanel();
		contentPane.add(panel_3, BorderLayout.SOUTH);
		
		JPanel panel_4 = new JPanel();
		contentPane.add(panel_4, BorderLayout.CENTER);
		GridBagLayout gbl_panel_4 = new GridBagLayout();
		gbl_panel_4.columnWidths = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0};
		gbl_panel_4.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0};
		gbl_panel_4.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
		gbl_panel_4.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
		panel_4.setLayout(gbl_panel_4);
		
		JButton btnNombreDeTarea = new JButton("Nombre de Tarea");
		GridBagConstraints gbc_btnNombreDeTarea = new GridBagConstraints();
		gbc_btnNombreDeTarea.insets = new Insets(0, 0, 5, 5);
		gbc_btnNombreDeTarea.gridx = 0;
		gbc_btnNombreDeTarea.gridy = 1;
		panel_4.add(btnNombreDeTarea, gbc_btnNombreDeTarea);
		
		txtNombreDeTarea = new JTextField();
		txtNombreDeTarea.setText("Nombre de tarea");
		GridBagConstraints gbc_txtNombreDeTarea = new GridBagConstraints();
		gbc_txtNombreDeTarea.gridwidth = 5;
		gbc_txtNombreDeTarea.insets = new Insets(0, 0, 5, 0);
		gbc_txtNombreDeTarea.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtNombreDeTarea.gridx = 3;
		gbc_txtNombreDeTarea.gridy = 1;
		panel_4.add(txtNombreDeTarea, gbc_txtNombreDeTarea);
		txtNombreDeTarea.setColumns(10);
		
		JButton btnMateria = new JButton("Estado");
		GridBagConstraints gbc_btnMateria = new GridBagConstraints();
		gbc_btnMateria.insets = new Insets(0, 0, 5, 5);
		gbc_btnMateria.gridx = 0;
		gbc_btnMateria.gridy = 2;
		panel_4.add(btnMateria, gbc_btnMateria);
		
		txtEstado = new JTextField();
		txtEstado.setText("Materia");
		GridBagConstraints gbc_txtMateria = new GridBagConstraints();
		gbc_txtMateria.gridwidth = 5;
		gbc_txtMateria.insets = new Insets(0, 0, 5, 0);
		gbc_txtMateria.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtMateria.gridx = 3;
		gbc_txtMateria.gridy = 2;
		panel_4.add(txtEstado, gbc_txtMateria);
		txtEstado.setColumns(10);
		
		JButton btnAutor = new JButton("Descripcion");
		GridBagConstraints gbc_btnAutor = new GridBagConstraints();
		gbc_btnAutor.insets = new Insets(0, 0, 5, 5);
		gbc_btnAutor.gridx = 0;
		gbc_btnAutor.gridy = 3;
		panel_4.add(btnAutor, gbc_btnAutor);
		
		txtDescripcion = new JTextField();
		txtDescripcion.setText("Autor");
		GridBagConstraints gbc_txtAutor = new GridBagConstraints();
		gbc_txtAutor.gridwidth = 5;
		gbc_txtAutor.insets = new Insets(0, 0, 5, 0);
		gbc_txtAutor.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtAutor.gridx = 3;
		gbc_txtAutor.gridy = 3;
		panel_4.add(txtDescripcion, gbc_txtAutor);
		txtDescripcion.setColumns(10);
		
		JButton btnFechaDeEntrega = new JButton("Fecha de entrega");
		GridBagConstraints gbc_btnFechaDeEntrega = new GridBagConstraints();
		gbc_btnFechaDeEntrega.insets = new Insets(0, 0, 5, 5);
		gbc_btnFechaDeEntrega.gridx = 0;
		gbc_btnFechaDeEntrega.gridy = 4;
		panel_4.add(btnFechaDeEntrega, gbc_btnFechaDeEntrega);
		
		txtFechaDeEntrega = new JTextField();
		txtFechaDeEntrega.setText("Fecha de Entrega");
		GridBagConstraints gbc_txtFechaDeEntrega = new GridBagConstraints();
		gbc_txtFechaDeEntrega.gridwidth = 5;
		gbc_txtFechaDeEntrega.insets = new Insets(0, 0, 5, 0);
		gbc_txtFechaDeEntrega.fill = GridBagConstraints.HORIZONTAL;
		gbc_txtFechaDeEntrega.gridx = 3;
		gbc_txtFechaDeEntrega.gridy = 4;
		panel_4.add(txtFechaDeEntrega, gbc_txtFechaDeEntrega);
		txtFechaDeEntrega.setColumns(10);
		
		JButton btnAgregarTarea = new JButton("Agregar Tarea");
		clean();
		GridBagConstraints gbc_btnAgergarTarea = new GridBagConstraints();
		gbc_btnAgergarTarea.gridx = 7;
		gbc_btnAgergarTarea.gridy = 5;
		panel_4.add(btnAgregarTarea, gbc_btnAgergarTarea);
		
		
		
		btnAgregarTarea.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			
				
				try{
					
					if(verify()==true){
						if(save()==true){
							JOptionPane.showMessageDialog(null,"La tarea  se agrego exitosamente   con el titulo "+txtNombreDeTarea.getText()+"\n"+"Y se  tiene que entregar antes de "+txtFechaDeEntrega.getText());	
						clean();
						}
						
					}
					
					
				}
					catch (Vacio ex) {
						JOptionPane.showMessageDialog(null, ex.getMessage(),
								"Validation error", JOptionPane.ERROR_MESSAGE);
						ex.getComponent().requestFocus();
					} catch (Exception ex) {
						JOptionPane.showMessageDialog(null, ex.getMessage(),
								"Validation error", JOptionPane.ERROR_MESSAGE);

					}
				
			

				
		
				
		}
			
		});
		
		
		

		
		
	}