Problems with SwingWorker and classes in my new job, ;), can you help me?

Hi all, ;)
First of all, sorry about my poor English.
I have a problem with Swing and Threads, I hope you help me (because I'm in the firsts two weeks in my new job)
I have two classes:
Form1: Its a JPanel class with JProgressBar and JLabel inside.
FormularioApplet: (the main) Its a JPanel class with a form1 inside.
I have to download a file from a server and show the progress of the download in the JProgressBar. To make it I do this:
In Form1 I make a Thread that update the progress bar and gets the fole from the server.
In FormularioApplet (the main) I call to the method getDownloadedFile from Form1 to get the File.
THE PROBLEM:
The execution of FormularioApplet finishes before the Thread of Form1 (with download the file) download the file. Then, when I call in FormularioApplet the variable with the file an Exception: Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException is generated.
First main begins his execution, then call to Form1 (a thread) then continues his execution and when the execution is finished ends the execution os Form1 and his thread.
How can I do for main class call the function and the Thread download his file after main class assign the file of return method?
How can I pass information froma class include an a main class. Form1 can't send to main (because main class made a Form1 f1 = new Form1()) any information from his end of the execution. I think if Form1 can say to main class that he finishes is job, then main class can gets the file.
I put in bold the important lines.
Note: My level of JAVA, you can see, is not elevated.
THANKS A LOT
Form1 class:
package es.cambrabcn.signer.gui;
import java.awt.HeadlessException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.StringTokenizer;
import java.util.Vector;
import javax.swing.SwingUtilities;
public class Form1 extends javax.swing.JPanel {
    //Variables relacionadas con la clase original DownloadProgressBar
    private InputStream file;
    private int totalCicles;
    private int totalFiles;
    private int currentProgress;
    private SwingWorker worker;
    private ByteArrayOutputStream byteArray;
    private boolean done;
    /** Creates new form prueba */
    public Form1() {
        initComponents();
        this.byteArray = new ByteArrayOutputStream();
        progressBar.setStringPainted(true);
        //this.totalFiles = totalFiles;
        currentProgress = 0;
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" C�digo Generado ">                         
    private void initComponents() {
        label1 = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();
        statusLabel = new javax.swing.JLabel();
        setBackground(new java.awt.Color(255, 255, 255));
        setMaximumSize(new java.awt.Dimension(300, 150));
        setMinimumSize(new java.awt.Dimension(300, 150));
        setPreferredSize(new java.awt.Dimension(300, 150));
        label1.setFont(new java.awt.Font("Arial", 1, 18));
        label1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        label1.setText("Barra de progreso");
        statusLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        statusLabel.setText("Cargando");
        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, statusLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, progressBar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, label1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE))
                .addContainerGap())
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(label1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(statusLabel)
                .addContainerGap(73, Short.MAX_VALUE))
    }// </editor-fold>                       
    // Declaraci�n de variables - no modificar                    
    private javax.swing.JLabel label1;
    private javax.swing.JProgressBar progressBar;
    private javax.swing.JLabel statusLabel;
    // Fin de declaraci�n de variables                  
    public byte[] getDownloadedFile(String documentToSign){
         //Variables locales
         byte puente[] = null;
         try{
            //Leemos el documento a firmar
            StringTokenizer st = new StringTokenizer(documentToSign, ";");
            Vector<URL> fileURL = new Vector<URL>();
            HttpSender sender = new HttpSender(null);
            //Introducimos la lista de URLs de archivos a bajar en el objeto Vector
            for(; st.hasMoreTokens(); fileURL.add(new URL(st.nextToken())));
            //Para cada URL descargaremos un archivo
            for(int i = 0; i < fileURL.size(); i++) {
                file = sender.getMethod((URL)fileURL.get(i));
                if(file == null) {
                    Thread.sleep(1000L);
                    throw new RuntimeException("Error descarregant el document a signar.");
                System.out.println("Form1 Dentro de getDownloadFile, Antes de startDownload()");
                //Fijamos el valor del n�mero de ciclos que se har�n seg�n el tama�o del fichero
                this.totalCicles = sender.returnCurrentContentLength() / 1024;
                this.progressBar.setMaximum(totalCicles);
                //Modificamos el texto del JLabel seg�n el n�mero de fichero que estemos descargando
                this.statusLabel.setText((new StringBuilder("Descarregant document ")).append(i + 1).append(" de ").append(fileURL.size()).toString());
                statusLabel.setAlignmentX(0.5F);
                *//Iniciamos la descarga del fichero, este m�todo llama internamente a un Thread*
                *this.startDownload();*
                *System.out.println("Form1 Dentro de getDownloadFile, Despu�s de startDownload()");*
                *//if (pane.showProgressDialog() == -1) {*
                *while (!this.isDone()){*
                    *System.out.println("No est� acabada la descarga");*
                    *if (this.isDone()){*
                        *System.out.println("Thread ACABADO --> Enviamos a puente el archivo");*
                        *puente = this.byteArray.toByteArray();*
                        *System.out.println("Form1 getDownloadFile() tama�o puente: " + puente.length);*
                    *else{*
                        *Thread.sleep(5000L);*
*//                        throw new RuntimeException("Proc�s de desc�rrega del document a signar cancel�lat.");*
        catch (HeadlessException e) {
                //javascript("onSignError", new String[] {
                //(new StringBuilder("UI: ")).append(e.getMessage()).toString()});
        e.printStackTrace();
        catch (MalformedURLException e) {
                //javascript("onSignError", new String[] {
                //(new StringBuilder("CMS: ")).append(e.getMessage()).toString()});
        e.printStackTrace();
        catch (HttpSenderException e) {
                //javascript("onSignError", new String[] {
                //(new StringBuilder("CMS: ")).append(e.getMessage()).toString()});
        e.printStackTrace();
        catch (InterruptedException e) {
                //javascript("onSignError", new String[] {
                //(new StringBuilder("CMS: ")).append(e.getMessage()).toString()});
        e.printStackTrace();
        //System.out.println("Form1 getDownloadFile() tama�o puente: " + puente.length);
        return puente;
    public void updateStatus(final int i){
        Runnable doSetProgressBarValue = new Runnable() {
            public void run() {
                progressBar.setValue(i);
        SwingUtilities.invokeLater(doSetProgressBarValue);
    public void startDownload() {
        System.out.println("Form1 Inicio startDownload()");
        System.out.println("Form1 Dentro de startDownload, antes de definir la subclase SwingWorker");
        System.out.println(done);
        worker = new SwingWorker() {
            public Object construct() {
                System.out.println("Form1 Dentro de startDownload, dentro de construct(), Antes de entrar en doWork()");
                return doWork();
            public void finished() {
                System.out.println("Form1 Dentro de startDownload, dentro de finished(), Antes de asignar done = true");
                System.out.println(done);
                done = true;
                System.out.println("Form1 Dentro de startDownload, dentro de finished(), Despu�s de asignar done = true");
                System.out.println(done);
                statusLabel.setText("Completado, tama�o del archivo: " + (byteArray.size() / 1024) + "KB");
        System.out.println("Form1 Dentro de startDownload, antes de worker.start()");
        worker.start();
        System.out.println("Form1 Dentro de startDownload, antes de salir de startDownload");
        System.out.println(done);
        System.out.println("Form1 Dentro de startDownload, despu�s de worker.start()");
     * M�todo doWork()
     * Este m�todo descarga por partes el archivo que es necesario descargar, adem�s de actualizar
     * la barra de carga del proceso de carga de la GUI.
    public Object doWork() {
        System.out.println("Form1 doWork() this.byteArray.size(): " + this.byteArray.size());
        try {
            byte buffer[] = new byte[1024];
            for(int c = 0; (c = this.file.read(buffer)) > 0;) {
                this.currentProgress++;
                updateStatus(this.currentProgress);
                this.byteArray.write(buffer, 0, c);
            this.byteArray.flush();
            this.file.close();
            this.currentProgress = totalCicles;
            updateStatus(this.currentProgress);
        } catch(IOException e) {
            e.printStackTrace();
        System.out.println("Form1 doWork() FINAL this.byteArray.size(): " + this.byteArray.size());
        //done = true;
        System.out.println("AHORA DONE = TRUE");
        return "Done";
    public boolean isDone() {
        return this.done;
FormularioApplet class (main)
package es.cambrabcn.signer.gui;
import java.awt.Color;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import java.security.Security;
import java.util.StringTokenizer;
import java.util.Vector;
import javax.swing.SwingUtilities;
import netscape.javascript.JSObject;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import sun.security.provider.Sun;
import be.cardon.cryptoapi.provider.CryptoAPIProvider;
public class FormularioApplet extends java.applet.Applet {
    //Variables globales
    int paso = 0;
    private static final String JS_ONLOAD = "onLoad";
    private static final String JS_ONLOADERROR = "onLoadError";
    private static final int SIGNATURE_PDF = 1;
    private static final int SIGNATURE_XML = 2;
    //private String signButtonValue;
    private int signatureType;
    private String documentToSign;
    private String pdfSignatureField;
    private Vector<String> outputFilename;
    private Color appletBackground = new Color(255, 255, 255);
    private Vector<byte[]> ftbsigned;
     * Initializes the applet FormularioApplet
    public void init(){
        try {
            SwingUtilities.invokeLater(new Runnable() {
            //SwingUtilities.invokeAndWait(new Runnable() {
            //java.awt.EventQueue.invokeAndWait(new Runnable() {
                public void run() {
                    try{
                        readParameters();
                        initComponents();
                    catch(FileNotFoundException e){
                        javascript(JS_ONLOADERROR, new String[] {
                            (new StringBuilder("Init: ")).append(e.getMessage()).toString()});
                        e.printStackTrace();                       
                    catch(IOException e) {
                        javascript(JS_ONLOADERROR, new String[] {
                            (new StringBuilder("Init: ")).append(e.getMessage()).toString()});
                        e.printStackTrace();
        catch (Exception e) {
            javascript(JS_ONLOADERROR, new String[] {
                (new StringBuilder("Init: ")).append(e.getMessage()).toString()});
            e.printStackTrace();
        javascript(JS_ONLOAD, null);
    /** This method is called from within the init() method to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" C�digo Generado ">
    private void initComponents() {
        this.setSize(350, 450);
        appletPanel = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jTextField1 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        label = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        setLayout(new java.awt.BorderLayout());
        appletPanel.setBackground(new java.awt.Color(255, 255, 255));
        appletPanel.setMaximumSize(new java.awt.Dimension(350, 430));
        appletPanel.setMinimumSize(new java.awt.Dimension(350, 430));
        appletPanel.setPreferredSize(new java.awt.Dimension(350, 430));
        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 204)));
        jTextField1.setFont(new java.awt.Font("Arial", 1, 18));
        jTextField1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jTextField1.setText("SIGNATURA ELECTRONICA");
        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 308, Short.MAX_VALUE)
                .addContainerGap())
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)
                .addContainerGap())
        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 204)));
        label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        label.setIcon(new javax.swing.ImageIcon("C:\\java\\workspaces\\cambrabcn\\firmasElectronicas\\logo.gif"));
        org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .add(label, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 308, Short.MAX_VALUE)
                .addContainerGap())
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .add(label)
                .addContainerGap(229, Short.MAX_VALUE))
        jPanel3.setBackground(new java.awt.Color(255, 255, 255));
        jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 204)));
        //this.jButton1.setVisible(false);
        //this.jButton2.setVisible(false);
        jButton1.setText("Seg\u00fcent");
        jButton1.setAlignmentX(0.5F);
        //Cargamos el primer formulario en el JPanel2
        loadFirstForm();
        //Modificamos el texto del bot�n y el contador de pasos.
        //this.jButton1.setText("Siguiente");
        //this.jButton1.setVisible(true);
        //this.jButton2.setVisible(true);
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
        jButton2.setText("Cancel\u00b7lar");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
        org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 94, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 112, Short.MAX_VALUE)
                .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 102, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jButton2)
                    .add(jButton1))
                .addContainerGap())
        org.jdesktop.layout.GroupLayout appletPanelLayout = new org.jdesktop.layout.GroupLayout(appletPanel);
        appletPanel.setLayout(appletPanelLayout);
        appletPanelLayout.setHorizontalGroup(
            appletPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, appletPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(appletPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        appletPanelLayout.setVerticalGroup(
            appletPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, appletPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        add(appletPanel, java.awt.BorderLayout.CENTER);
    }// </editor-fold>
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
        this.destroy();
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        changeForms(this.paso);
    // Declaraci�n de variables - no modificar
    private javax.swing.JPanel appletPanel;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JLabel jTextField1;
    private javax.swing.JLabel label;
    // Fin de declaraci�n de variables
     * M�todo readParameters
     * M�todo que inicializa los valores de los par�metros internos, recibidos por par�metro.
    private void readParameters() throws FileNotFoundException, IOException {
         ???????????????? deleted for the forum
        addSecurityProviders();
     * M�tode loadFirstForm
     * Aquest m�tode carrega a jPanel2 el formulari que informa sobre la c�rrega dels arxius
    private void loadFirstForm(){
        //Form1 f1 = new Form1(stream, i + 1, fileURL.size(), sender.returnCurrentContentLength(), appletBackground);
        //Form1 f1 = new Form1(fileURL.size(), sender.returnCurrentContentLength());
        Form1 f1 = new Form1();
        //Lo dimensionamos y posicionamos
        f1.setSize(310, 150);
        f1.setLocation(10, 110);
        //A�adimos el formulario al JPanel que lo contendr�
        this.jPanel2.add(f1);
        //Validem i repintem el JPanel
        jPanel2.validate();
        jPanel2.repaint();
        //Descarreguem l'arxiu a signar
        *System.out.println("FormularioApplet Dentro de loadFirstForm(), antes de llamar a getDownloadFile()");*
        *byte obj[] = f1.getDownloadedFile(this.documentToSign);*
        if (obj == null){
            System.out.println("Lo que devuelve f1.getDownloadedFile(this.documentToSign) es NULL");
        else{
            System.out.println("Lo que devuelve f1.getDownloadedFile(this.documentToSign) NO es NULL");
            System.out.println("obj: " + obj.length);
        this.ftbsigned.add(obj);
        System.out.println("FormularioApplet Dentro de loadFirstForm(), despu�s de llamar a getDownloadFile()");
        //Indicamos que el primer paso ya se ha efectuado
        this.paso++;
     * M�tode changeForms
     * Aquest m�tode carrega a jPanel2 un formulari concret segons el valor de la variable global "paso"
    private void changeForms(int paso){
        /*A cada paso se cargar� en el JPanel y formulario diferente
         * Paso previo: Se realiza en la inicializaci�n, carga el formulario, descarga el archivo y muestra la barra de carga.
         * Case 1: Se carga el formulario de selecci�n de tipo de firma.
         * Case 2: Se carga el formulario de datos de la persona que firma.
        this.paso = paso;
        switch(paso){
            case 1:
                //Creamos un objeto de formulario (seleccion de tipo de firma)
                Form2 f2 = new Form2();
                //Lo dimensionamos y posicionamos
                f2.setSize(310, 185);
                f2.setLocation(10, 110);
                //Quitamos el formulario 1 y a�adimos el formulario 2 al JPanel
                this.jPanel2.remove(1);
                this.jPanel2.add(f2);
                //Validem i repintem el JPanel
                jPanel2.validate();
                jPanel2.repaint();
                //Modificamos el contador de pasos.
                this.paso++;
                break;
            case 2:
                //Creamos un objeto de formulario (seleccion de tipo de firma)
                Form3 f3 = new Form3();
                //Lo dimensionamos y posicionamos
                f3.setSize(310, 175);
                f3.setLocation(15, 130);
                //Quitamos el formulario 1 y a�adimos el formulario 3 al JPanel
                this.jPanel2.remove(1);
                this.jPanel2.add(f3);
                //Validem i repintem el JPanel
                jPanel2.validate();
                jPanel2.repaint();
                //Modificamos el texto del bot�n y el contador de pasos.
                this.jButton1.setText("Finalizar");
                this.paso++;
                break;
            default:
                //Finalizar el Applet
                //C�digo que se encargue de guardar el archivo en el disco duro del usuario
                break;
    private void addSecurityProviders() throws FileNotFoundException, IOException {
        Security.addProvider(new CryptoAPIProvider());
        if (signatureType == SIGNATURE_PDF) {
            Security.addProvider(new BouncyCastleProvider());
        else {
            Security.addProvider(new Sun());
    private File createOutputFile(String filename, int index) {
        return new File((String)outputFilename.get(index));
    protected Object javascript(String function, String args[]) throws RuntimeException {
        //Remove
        if (true) return null;
        try {
            Vector<String> list = new Vector<String>();
            if(args != null) {
                for(int i = 0; i < args.length; i++) {
                    list.addElement(args);
if(list.size() > 0) {
Object objs[] = new Object[list.size()];
list.copyInto(objs);
return JSObject.getWindow(this).call(function, objs);
} catch(UnsatisfiedLinkError e) {
e.printStackTrace();
throw new RuntimeException((new StringBuilder()).append(e).append("\nFunci�: ").append(function).toString());
} catch(Throwable e) {
e.printStackTrace();
throw new RuntimeException((new StringBuilder()).append(e).append("\nFunci�: ").append(function).toString());
return JSObject.getWindow(this).call(function, new Object[0]);
Edited by: Kefalegereta on Oct 31, 2007 3:54 AM
Edited by: Kefalegereta on Oct 31, 2007 4:00 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
Additional things to try.
Try this first. Turn Off your iPad. Then turn Off (disconnect power cord) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
Change the channel on your wireless router. Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
How to Quickly Fix iPad 3 Wi-Fi Reception Problems
http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
If none of the above suggestions work, look at this link.
iPad Wi-Fi Problems: Comprehensive List of Fixes
http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
~~~~~~~~~~~~~~~
If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
 Cheers, Tom

Similar Messages

Maybe you are looking for