@@ -0,0 +1,1957 @@
+package vista;%0A%0A/*********************************************************%0A * %09Primera Vista para Cuenta%0A *********************************************************/%0Aimport java.awt.*;%0Aimport javax.swing.*;%0A%0Aimport controlador.IObserver;%0A%0Aimport java.awt.event.*;%0Aimport java.util.ArrayList;%0A%0A@SuppressWarnings(%22serial%22)%0Apublic class VistaEuroDolar extends JPanel implements IVistaConversor%7B%0A%09%0A%09private JTextField cantidadJTF;%0A%09private JLabel valorDivisaJL;%0A%09private JLabel cambioJL;%0A%09private JLabel mensajeJL;%0A%09private JButton cambiarJB;%0A%09private ArrayList%3CIObserver%3E observers;%0A%0A%09public VistaEuroDolar() %7B%0A%09%09// Definicion de componentes basicos%0A%09%09cantidadJTF = new JTextField(10);%0A%09%09valorDivisaJL = new JLabel(%220%22, SwingConstants.RIGHT);%0A%09%09cambioJL = new JLabel(%221.00%22, SwingConstants.CENTER);%0A%09%09cambiarJB = new JButton(%22Cambiar%22);%0A%09%09mensajeJL = new JLabel(%22vista creada%22);%0A%09%09%0A%09%09// Panel central%0A%09%09JPanel panelC = new JPanel();%0A%09%09panelC.setLayout(new GridLayout(3, 2));%0A%09%09panelC.add(new JLabel(%22Euro%22, SwingConstants.CENTER));%0A%09%09panelC.add(new JLabel(%22Dolar%22, SwingConstants.CENTER));%0A%09%09panelC.add(cantidadJTF);%0A%09%09panelC.add(valorDivisaJL);%0A%09%09panelC.add(cambioJL);%0A%09%09panelC.add(cambiarJB);%0A%09%09%0A%09%09// Panelk sur para el mensaje%0A%09%09JPanel panelS = new JPanel();%0A%09%09panelS.add(mensajeJL);%0A%09%09%0A%09%09// Confeccion del panel principal de contenidos%0A%09%09setLayout(new BorderLayout());%0A%09%09add(panelC, BorderLayout.CENTER);%0A%09%09add(panelS, BorderLayout.SOUTH);%0A%09%7D%0A%0A%09public void controlador(ActionListener ctr) %7B%0A%09%09cambiarJB.addActionListener(ctr);%0A%09%09cambiarJB.setActionCommand(CAMBIO);%0A%09%7D%0A%0A%09public double obtenerCantidad() %7B%0A%09%09return Double.parseDouble(cantidadJTF.getText());%0A%09%7D%0A%0A%09%0A%09@Override%0A%09public void valorCambio(double cambio) %7B%0A%09%09cambioJL.setText(String.format(%22%25,8.5f%22, cambio));%09%0A%09%7D%0A%0A%09@Override%0A%09public void valorDivisa(double valor) %7B%0A%09%09valorDivisaJL.setText(String.format(%22%25,12.2f%22, valor));%09%09%0A%09%7D%0A%0A%09public void mensaje(String msg) %7B%0A%09%09mensajeJL.setText(msg);%0A%09%7D%0A%0A%0A%7D%0A

Update VistaEuroDolar.java