package Applications.BoardsFactory; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class PrincipalFrame extends JFrame { private BorderLayout borderLayout1 = new BorderLayout(); private ProductorBoard Pboard = new ProductorBoard (); private ConsumerBoard Cboard = new ConsumerBoard (); private boolean prod = false; //Construir el marco public PrincipalFrame(String arg) { enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { this.getContentPane().setLayout(borderLayout1); this.setSize(new Dimension(450, 450)); if ( arg.equals ("P") ) { prod = true; this.setTitle("Productor Board"); this.getContentPane().add( Pboard, BorderLayout.CENTER); } else { this.setTitle("Consumer Board"); this.getContentPane().add( Cboard, BorderLayout.CENTER); } }catch(Exception e) { System.err.println( "ERROR: " + e ); } } //Modificado para poder salir cuando se cierre el sistema protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if(e.getID() == WindowEvent.WINDOW_CLOSING) { this.remove(Pboard); Pboard.Destruir(); this.remove(Cboard); Cboard.Destruir(); System.exit(0); } } } e-REdING. Biblioteca de la Escuela Superior de Ingenieros de Sevilla.


DISEÑO E IMPLEMENTACIÓN DEL SERVICIO DE EVENTOS DE CORBA PARA JAVA IDL

: Díaz Caballero, Victor M.
: Ingeniería Telecomunicación
Contenido del proyecto: