public void createView() {
   // Create all Swing components here
   viewPanel = new JPanel(new GridLayout(1, 2));
   viewFrame = new JFrame("View");
   viewFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   viewFrame.setSize(new Dimension(100, 80));
   bpmOutputLabel = new JLabel("offline", SwingConstants.CENTER);
   beatBar = new BeatBar();
   beatBar.setValue(0);
   bpmPanel = new JPanel(new GridLayout(5, 1)); // var local , borramos JPanel
   bpmPanel.add(beatBar);
   bpmPanel.add(bpmOutputLabel);
   viewPanel.add(bpmPanel);
   viewFrame.getContentPane().add(viewPanel, BorderLayout.CENTER);
   viewFrame.pack();
   viewFrame.setVisible(true);
 }
 public void updateBeat() {
   if (beatBar != null) {
     beatBar.setValue(100);
   }
 }