Mudreco

Clase Ventana_Administrador

Jun 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.51 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package ejercicioinscripciones;
  7.  
  8. import java.awt.BorderLayout;
  9. import static java.awt.BorderLayout.*;
  10. import java.awt.FlowLayout;
  11. import javax.swing.JButton;
  12. import javax.swing.JFrame;
  13. import javax.swing.JLabel;
  14.  
  15. import javax.swing.JPanel;
  16. import javax.swing.JTextArea;
  17.  
  18. public class Ventana_Administrador extends JFrame {
  19.  
  20.     Registro registro;
  21.  
  22.     public Ventana_Administrador(Registro registro) {
  23.         this.registro = registro;
  24.        
  25.         super.setLayout(new BorderLayout());
  26.         super.add(panel, NORTH);
  27.         panel.setVisible(true);
  28.         panel.setLayout(new FlowLayout());
  29.         super.setResizable(false);
  30.         super.setBounds(500, 500, 500, 500);
  31.         super.setDefaultCloseOperation(EXIT_ON_CLOSE);
  32.         panel.add(bEliminarAlumno);
  33.         panel.add(bLimpiarLista);
  34.         lista.setText(registro.getAlumnoInscripto());
  35.         super.setLocationRelativeTo(null);
  36.  
  37.         super.add(lista, CENTER);
  38.     }
  39.     JPanel panel = new JPanel();
  40.     //TODO implementar la posibilidad de eliminar solo un alumno
  41.     int numeroCupo;
  42.     JButton bEliminarAlumno = new JButton("Eliminar Alumno");
  43.     JButton bLimpiarLista = new JButton("Limpiar Lista");
  44.     JTextArea lista = new JTextArea();
  45.  
  46.     public void Actualizar() {
  47.         lista.setText(registro.getAlumnoInscripto());
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment