private void go()throws InterruptedException{ 
           int i=1;
           float dpercent = 0f;
           String cc = c[0];
           
           app.setEnabled(false);
           
        JFrame.setDefaultLookAndFeelDecorated(true);
            JFrame fFrame = new JFrame("Please wait while updating.");
            fFrame.addWindowListener(new java.awt.event.WindowAdapter() {
                @Override
                public void windowClosing(java.awt.event.WindowEvent windowEvent) {
                    app.setEnabled(true);
                }
            });
            fFrame.setLocationRelativeTo(null);
            JPanel panel = new JPanel();
             JPanel panel2 = new JPanel();
            fFrame.setSize(400,125);  
            //panel.setSize(300,300);
            fFrame.getContentPane().add(panel, BorderLayout.CENTER);
            JLabel percent = new JLabel();
            JLabel message = new JLabel();
            message.setText("Updating Currency Code " +  cc + ".");
            // string format for percentage
            percent.setText(String.format("%,.0f%%", dpercent));
            panel.add(percent);
            fFrame.getContentPane().add(panel2, BorderLayout.SOUTH);
            panel2.add(message);
            JProgressBar jpb = new JProgressBar(0,90);
            panel.add(jpb);
            //fFrame.pack();
            fFrame.setVisible(true);
            if (p<90){
            while (p<90){
               if (Thread.currentThread().isInterrupted()){
               fFrame.dispose();
               return;
           }
               if (kill){
                  Thread.currentThread().interrupt();
                 fFrame.dispose();
                  return;
              }
               
               i=getP();
               jpb.setValue(i);
               dpercent = ((i+1) * 100.0f) / 90;
               //System.out.println(i);
               cc = c[i];
               percent.setText(String.format("%,.0f%%", dpercent));
               message.setText("Updating Currency Code " +  cc + ".");
               jpb.repaint();
               try{Thread.sleep(450);} //Sleep 50 milliseconds  

              catch (InterruptedException err){}  

            }
            }
                app.setEnabled(true);
                fFrame.dispose();
            
            
      }