Applet funktioniert nach Browserreload nicht richtig

S

sognix

Gast
Hallo!

Ich hab das Forum schon durchforstet und nicht wirklich was hilfreiches gefunden, daher mach ich ein neues Thema auf:

Ich habe ein Applet geschrieben, dass über ein HTTP-Request ein XML zurückbekommt dieses auswertet und dann Elemente zeichnet.

Mein Problem ist jetzt: Wenn ich den Browser starte und die Seite des Applets aufrufe, funktionierts einwandfrei, wenn ich jetzt die Seite neu Lade ohne den Browser neu zu starten, dann funktionierts nicht mehr richtig.

Ich hab den Verdacht, dass ich was mit der init(), start(), stop() oder destroy() machen muss bzw dass das ganze mit dem Cache vom Browser zusammenhängt.

Witzigerweise funktioniert das unter RuntimeEnvironment jre1.6.0_07 einwandfrei, nur neuere Environments spinnen herum.

Folgend der Code von meiner Appletklasse:

Java:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package main;


//own Packages
import GUI.*;
import GUI.LISTENER.*;
import GUI.PAINT.*;

//java Packages
import java.awt.Color;
import java.awt.Cursor;
import javax.swing.*;
import javax.swing.plaf.ColorUIResource;


/**
 *
 * @author Mario Santner
 */
public class applet extends JApplet
{
    private Functions functions;
    private Cache cache;
    private SaveDialog save;
    
    /*      SWING ELEMENTS      */
    //Swing Elements for Search
    private JLabel l_search;
    private JTextField tf_search;
    
    //Swing Elements for Zoom
    private JLabel l_zoomLeft;
    private JLabel l_zoomRight;
    private JTextField tf_zoomLeft;
    private JTextField tf_zoomRight;
    
    //Swing Elements for Age
    private JLabel l_from;
    private JLabel l_to;
    private JTextField tf_from;
    private JTextField tf_to;
    
    //Swing Elements for System
    public JRadioButton rb_production;
    public JRadioButton rb_acceptance;
    public ButtonGroup gr_system;
    
    //Swing Elements for applet
    private MainTable t_Main;
    private JScrollPane s_tMain;
    private JLabel l_picBox;
    private PictureBox p_picBox;
    private JScrollPane s_ppicBox;
    private int object;
    //0 nothing is set
    //1 table is set (also the startTable)
    //2 picBox is set
    
    //Swing Elements for Information
    private JLabel l_Info;
    private MainTable t_Info;
    private JScrollPane s_tInfo;
    
    //Swing Elements for Path
    private JLabel l_path;
    private JTextField tf_path;
    
    //Buttons
    private JButton b_search;
    private JButton b_edit;
    private JButton b_back;
    private JButton b_next;
    private JButton b_center;
    private JButton b_copyClipBoard;
    private JButton b_save;
    private JButton b_link;
    
    //ActionListener
    private ButtonListener listen_button;
    private keyListener listen_key;
    
    //Other
    private String link;
    
    public applet()
    {
        
        
        
        //JOptionPane.showMessageDialog(this, System.getProperty("java.version"));
    }
    
    
    /*      GETTER      */
    /**
     * Method to get Buttons <br />
     * Parameter search, edit, back, next, center, clipboard, save
     * @param String _type 
     * @return JButton
     */
    public JButton getButton(String _type)
    {
        if(_type.equals("search"))
            return this.b_search;
        else if(_type.equals("edit"))
            return this.b_edit;
        else if(_type.equals("back"))
            return this.b_back;
        else if(_type.equals("next"))
            return this.b_next;
        else if(_type.equals("center"))
            return this.b_center;
        else if(_type.equals("clipboard"))
            return this.b_copyClipBoard;
        else if(_type.equals("save"))
            return this.b_save;

        return null;
    }

    /**
     * Method to get TextFields <br />
     * Parameter: search, zoomLeft, zoomRight, from, to, path
     * @param String _type
     * @return JTextField
     */
    public JTextField getTextField(String _type)
    {
        if(_type.equals("search"))
            return this.tf_search;
        else if(_type.equals("zoomLeft"))
            return this.tf_zoomLeft;
        else if(_type.equals("zoomRight"))
            return this.tf_zoomRight;
        else if(_type.equals("to"))
            return this.tf_to;
        else if(_type.equals("from"))
            return this.tf_from;
        else if(_type.equals("path"))
            return this.tf_path;
        
        return null;
    }
    
    /**
     * Method to get Tables <br />
     * Parameter: main, Info
     * @param String _type
     * @return JTable
     */
    public JTable getTable(String _type)
    {
        if(_type.equals("main"))
            return this.t_Main;
        else if(_type.equals("info"))
            return this.t_Info;
        
        return null;
    }
    
    /**
     * Method to get ScrollPanes <br />
     * Parameter: main, info, picBox
     * @param String _type
     * @return JTable
     */
    public JScrollPane getScrollbar(String _type)
    {
        if(_type.equals("main"))
            return this.s_tMain;
        else if(_type.equals("info"))
            return this.s_tInfo;
        else if(_type.equals("picBox"))
            return this.s_ppicBox;
        
        return null;
    }
    
    /**
     * Method to get Labels <br />
     * Parameter: picBox
     * @param String _type
     * @return JLabel
     */
    public JLabel getLabel(String _type)
    {
        if(_type.equals("picBox"))
            return this.l_picBox;
        
        return null;
    }
    
    public PictureBox getPicBox()
    { return this.p_picBox; }
    
    public int getObject()
    { return this.object; }
    
    /**
     * Method to get RadioButtons <br />
     * Parameter: production, acceptance
     * @param String _type
     * @return JRadioButton
     */
    public JRadioButton getRadioButton(String _type)
    { 
        if(_type.equals("production"))
            return this.rb_production;
        else if(_type.equals("acceptance"))
            return this.rb_acceptance;
        
        return null;
    }
    
    public ButtonGroup getButtonGroup()
    { return this.gr_system; }
    
    public String getLink()
    { return this.link; }
    
    /*      SETTER      */
    /**
     * Method to set Tables <br />
     * Parameter: main, Info
     * @param String _type, JTable _table
     * @return void
     */
    public void setTable(String _type, MainTable _table)
    {
        if(_type.equals("main"))
            this.t_Main = _table;
        else if(_type.equals("info"))
            this.t_Info = _table;
    }
    
    /**
     * Method to set ScrollPanes <br />
     * Parameter: main, info, picBox
     * @param String _type, JScrollPane _scroll
     * @return void
     */
    public void setScrollPane(String _type, JScrollPane _scroll)
    {
        if(_type.equals("main"))
            this.s_tMain = _scroll;
        else if(_type.equals("info"))
            this.s_tInfo = _scroll;
        else if(_type.equals("picBox"))
            this.s_ppicBox = _scroll;
    }
    
    public void setPicBox(PictureBox _picBox)
    { this.p_picBox = _picBox; }
    
    public void setObject(int _obj)
    { this.object = _obj; }
    
    /**
     * Method to set RadioButtons <br />
     * Parameter: production, reduction
     * @param String _type, JRadioButton _button
     * @return void
     */
    public void setRadioButton(String _type, JRadioButton _button)
    { 
        if(_type.equals("production"))
            this.rb_production = _button;
        else if(_type.equals("reduction"))
            this.rb_acceptance = _button;
    }
    
    
    /*      JavaScript METHODS      */
    public void setLink(String _link)
    { 
        
        this.link = _link;

        if(this.link.indexOf("?") != -1)
        {
            System.out.println("NICHT LEER");
            
            
            try
            { this.tf_search.setText(this.link.substring(this.link.indexOf("&ok")+4, this.link.indexOf("&zl"))); }
            catch (NullPointerException ex)
            { this.tf_search.setText(this.link.substring(this.link.indexOf("&sk")+4, this.link.indexOf("&zl"))); }
            
            this.tf_zoomLeft.setText(this.link.substring(this.link.indexOf("&zl")+4, this.link.indexOf("&zr")));
            this.tf_zoomRight.setText(this.link.substring(this.link.indexOf("&zr")+4, this.link.indexOf("&to")));
            this.tf_from.setText(this.link.substring(this.link.indexOf("&fo")+4, this.link.length()));
            this.tf_to.setText(this.link.substring(this.link.indexOf("&to")+4, this.link.indexOf("&fo")));
        }
    }
    
    
    public void init()
    {
        super.init();
    }
    
    public void start()
    {
        super.start();
    }
    
    public void stop()
    {
        super.stop();
    }
    
    public void destroy()
    {
        super.destroy();
    }
}

Danke schonmal!
 
S

sognix

Gast
Sry, beim Code kopieren ist was verlorgen gegangen, jetzt der komplette:

Java:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package main;


//own Packages
import GUI.*;
import GUI.LISTENER.*;
import GUI.PAINT.*;

//java Packages
import java.awt.Color;
import java.awt.Cursor;
import javax.swing.*;
import javax.swing.plaf.ColorUIResource;


/**
 *
 * @author Mario Santner
 */
public class applet extends JApplet
{
    private Functions functions;
    private Cache cache;
    private SaveDialog save;
    
    /*      SWING ELEMENTS      */
    //Swing Elements for Search
    private JLabel l_search;
    private JTextField tf_search;
    
    //Swing Elements for Zoom
    private JLabel l_zoomLeft;
    private JLabel l_zoomRight;
    private JTextField tf_zoomLeft;
    private JTextField tf_zoomRight;
    
    //Swing Elements for Age
    private JLabel l_from;
    private JLabel l_to;
    private JTextField tf_from;
    private JTextField tf_to;
    
    //Swing Elements for System
    public JRadioButton rb_production;
    public JRadioButton rb_acceptance;
    public ButtonGroup gr_system;
    
    //Swing Elements for applet
    private MainTable t_Main;
    private JScrollPane s_tMain;
    private JLabel l_picBox;
    private PictureBox p_picBox;
    private JScrollPane s_ppicBox;
    private int object;
    //0 nothing is set
    //1 table is set (also the startTable)
    //2 picBox is set
    
    //Swing Elements for Information
    private JLabel l_Info;
    private MainTable t_Info;
    private JScrollPane s_tInfo;
    
    //Swing Elements for Path
    private JLabel l_path;
    private JTextField tf_path;
    
    //Buttons
    private JButton b_search;
    private JButton b_edit;
    private JButton b_back;
    private JButton b_next;
    private JButton b_center;
    private JButton b_copyClipBoard;
    private JButton b_save;
    private JButton b_link;
    
    //ActionListener
    private ButtonListener listen_button;
    private keyListener listen_key;
    
    //Other
    private String link;
    
    public applet()
    {
        this.cache = Cache.getInstance();
        this.cache.setFrame(this);
        this.functions = Functions.getInstance();
        this.functions.setFrame(this);
        this.save = SaveDialog.getInstance();
        this.save.setMainFrame(this);
        
        //ToolTipManager
        ToolTipManager ttm = ToolTipManager.sharedInstance();
        ttm.setDismissDelay(this.cache.toolTipTime);
        UIManager.put("ToolTip.background", new ColorUIResource(255, 255, 255)); 
        
        /*      WINDOW      */
        this.setName("Show Flow");
        //this.setTitle("Show Flow");
        this.setLayout(null);
        this.setVisible(true);
        this.setSize(930, 650);
        //this.setLocationRelativeTo(null);
        //this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        //this.setResizable(false);
        
        
        /*      SEARCH      */
        //label
        this.l_search = new JLabel("Search");
        this.l_search.setVisible(true);
        this.l_search.setLocation(11, 10);
        this.l_search.setSize(100, 15);
        this.add(this.l_search); 
        
        //textfield
        this.tf_search = new JTextField("");
        this.tf_search.setEditable(true);
        this.tf_search.setVisible(true);
        this.tf_search.setLocation(10, 30);
        this.tf_search.setSize(300, 25);
        this.add(this.tf_search);
        
        
        /*      ZOOM      */
        ////ZOOM LEFT
        //label
        this.l_zoomLeft = new JLabel("Elements left");
        this.l_zoomLeft.setVisible(true);
        this.l_zoomLeft.setLocation(330, 10);
        this.l_zoomLeft.setSize(82, 15);
        this.add(this.l_zoomLeft);
        
        //textfield
        this.tf_zoomLeft = new JTextField("3");
        this.tf_zoomLeft.setEditable(true);
        this.tf_zoomLeft.setVisible(true);
        this.tf_zoomLeft.setLocation(330, 30);
        this.tf_zoomLeft.setSize(82, 25);
        this.add(this.tf_zoomLeft);
        
        ////ZOOM RIGHT
        //label
        this.l_zoomRight= new JLabel("Elements right");
        this.l_zoomRight.setVisible(true);
        this.l_zoomRight.setLocation(422, 10);
        this.l_zoomRight.setSize(82, 15);
        this.add(this.l_zoomRight);
        
        //textfield
        this.tf_zoomRight = new JTextField("3");
        this.tf_zoomRight.setEditable(true);
        this.tf_zoomRight.setVisible(true);
        this.tf_zoomRight.setLocation(422, 30);
        this.tf_zoomRight.setSize(82, 25);
        this.add(this.tf_zoomRight);
        
        
        /*      AGE      */
        ////FROM
        //textfield
        this.tf_from = new JTextField("1990-01-01");
        this.tf_from.setEditable(true);
        this.tf_from.setVisible(true);
        this.tf_from.setLocation(580, 10);
        this.tf_from.setSize(80, 20);
        this.add(this.tf_from);
        
        //label
        this.l_from = new JLabel("days");
        this.l_from.setVisible(true);
        this.l_from.setLocation(668, 11);
        this.l_from.setSize(30, 15);
        this.add(this.l_from);
        
        ////TO
        //textfield
        this.tf_to = new JTextField(this.functions.getToday());
        this.tf_to.setEditable(true);
        this.tf_to.setVisible(true);
        this.tf_to.setLocation(580, 35);
        this.tf_to.setSize(80, 20);
        this.add(this.tf_to);
        
        //label
        this.l_to = new JLabel("days");
        this.l_to.setVisible(true);
        this.l_to.setLocation(668, 37);
        this.l_to.setSize(30, 15);
        this.add(this.l_to);
        
        
        /*      SYSTEM      */
        this.gr_system = new ButtonGroup();
        
        ////REDUCTION
        this.rb_acceptance = new JRadioButton("Reduction");
        this.rb_acceptance.setVisible(true);
        this.rb_acceptance.setLocation(715, 10);
        this.rb_acceptance.setSize(100, 18);
        this.rb_acceptance.setSelected(true);
        this.gr_system.add(this.rb_acceptance);
        this.add(this.rb_acceptance);
        
        ////PRODUCTION (Produktion)
        this.rb_production = new JRadioButton("Production");
        this.rb_production.setVisible(true);
        this.rb_production.setLocation(715, 36);
        this.rb_production.setSize(100, 18);
        this.rb_production.setSelected(false);
        this.gr_system.add(this.rb_production);
        this.add(this.rb_production);

        
        /*      BUTTONS      */
        //ok
        this.b_search = new JButton("search");
        this.b_search.setVisible(true);
        this.b_search.setLocation(822, 10);
        this.b_search.setSize(90, 20);
        this.b_search.setFocusable(false);
        this.add(this.b_search);
        
        //edit
        this.b_edit = new JButton("edit View");
        this.b_edit.setEnabled(false);
        this.b_edit.setVisible(true);
        this.b_edit.setLocation(822, 35);
        this.b_edit.setSize(90, 20);
        this.b_edit.setFocusable(false);
        this.add(this.b_edit);
        
        //save
        this.b_save = new JButton("save as JPG");
        this.b_save.setVisible(true);
        this.b_save.setEnabled(false);
        this.b_save.setLocation(85, 475);
        this.b_save.setSize(110, 20);
        this.b_save.setFocusable(false);
        this.add(this.b_save);
        
        //link
        this.b_link = new JButton("Link to Tracking");
        this.b_link.setVisible(true);
        this.b_link.setEnabled(false);
        this.b_link.setLocation(330, 475);
        this.b_link.setSize(130, 20);
        this.b_link.setFocusable(false);
        this.add(this.b_link);
        
        //center
        this.b_center = new JButton("center");
        this.b_center.setVisible(true);
        this.b_center.setEnabled(false);
        this.b_center.setLocation(600, 475);
        this.b_center.setSize(80, 20);
        this.b_center.setFocusable(false);
        this.add(this.b_center);
        
        //back
        this.b_back = new JButton("back");
        this.b_back.setVisible(true);
        this.b_back.setEnabled(false);
        this.b_back.setLocation(741, 475);
        this.b_back.setSize(80, 20);
        this.b_back.setFocusable(false);
        this.add(this.b_back);
        
        //next
        this.b_next = new JButton("next");
        this.b_next.setVisible(true);
        this.b_next.setEnabled(false);
        this.b_next.setLocation(832, 475);
        this.b_next.setSize(80, 20);
        this.b_next.setFocusable(false);
        this.add(this.b_next);
        
        //copyClipBoard
        this.b_copyClipBoard = new JButton("Copy to Clipboard");
        this.b_copyClipBoard.setVisible(true);
        this.b_copyClipBoard.setEnabled(true);
        this.b_copyClipBoard.setLocation(775, 593);
        this.b_copyClipBoard.setSize(135, 20);
        this.b_copyClipBoard.setFocusable(false);
        this.add(this.b_copyClipBoard);
        
        
        /*      PATH      */
        //label
        this.l_path = new JLabel("Link to this item:");
        this.l_path.setVisible(true);
        this.l_path.setLocation(10, 595);
        this.l_path.setSize(100, 15);
        this.add(this.l_path);
        
        //textfield
        this.tf_path = new JTextField("");
        this.tf_path.setEditable(false);
        this.tf_path.setVisible(true);
        this.tf_path.setLocation(110, 590);
        this.tf_path.setSize(655, 25);
        this.tf_path.setBackground(Color.WHITE);
        this.tf_path.setCursor(new Cursor(Cursor.TEXT_CURSOR));
        this.add(this.tf_path);
        
        
        /*      INFO      */
        //label
        this.l_Info = new JLabel("Information");
        this.l_Info.setVisible(true);
        this.l_Info.setLocation(11, 493);
        this.l_Info.setSize(80, 15);
        this.add(this.l_Info);
        
        //table + scrollpane
        this.cache.blankInfoTable = this.functions.createInfoTable(this.cache.info_title, null);
        
        
         /*      MAIN FRAME      */
        ////PICTURE BOX
        //label
        this.l_picBox = new JLabel(this.cache.picBox_title);
        this.l_picBox.setVisible(false);
        this.l_picBox.setLocation(430, 72);
        this.l_picBox.setSize(100, 15);
        this.add(this.l_picBox);
        
        
        ////SEARCH
        //table + scrollpane
        this.functions.createMainTable(this.cache.main_title, null);
        this.functions.addObjectCache(this.t_Main);
    
        
        //setting focus for start
        this.tf_search.requestFocus();
        
        this.repaint();
         
        
        /*      LISTENER      */
        //BUTTONS
        this.listen_button = new ButtonListener(this);
        this.b_search.addActionListener(this.listen_button);
        this.b_edit.addActionListener(this.listen_button);
        this.b_back.addActionListener(this.listen_button);
        this.b_next.addActionListener(this.listen_button);
        this.b_center.addActionListener(this.listen_button);
        this.b_copyClipBoard.addActionListener(this.listen_button);
        this.b_save.addActionListener(this.listen_button);
        
        //SEARCH
        this.listen_key = new keyListener(this);
        this.tf_search.addKeyListener(this.listen_key);
        this.tf_zoomLeft.addKeyListener(this.listen_key);
        this.tf_zoomRight.addKeyListener(this.listen_key);
        this.tf_from.addKeyListener(this.listen_key);
        this.tf_to.addKeyListener(this.listen_key);
        
        //SEARCH WITH PATH
        this.tf_path.addKeyListener(new keyListener(this));

        
        
        //JOptionPane.showMessageDialog(this, System.getProperty("java.version"));
    }
    
    
    /*      GETTER      */
    /**
     * Method to get Buttons <br />
     * Parameter search, edit, back, next, center, clipboard, save
     * @param String _type 
     * @return JButton
     */
    public JButton getButton(String _type)
    {
        if(_type.equals("search"))
            return this.b_search;
        else if(_type.equals("edit"))
            return this.b_edit;
        else if(_type.equals("back"))
            return this.b_back;
        else if(_type.equals("next"))
            return this.b_next;
        else if(_type.equals("center"))
            return this.b_center;
        else if(_type.equals("clipboard"))
            return this.b_copyClipBoard;
        else if(_type.equals("save"))
            return this.b_save;

        return null;
    }

    /**
     * Method to get TextFields <br />
     * Parameter: search, zoomLeft, zoomRight, from, to, path
     * @param String _type
     * @return JTextField
     */
    public JTextField getTextField(String _type)
    {
        if(_type.equals("search"))
            return this.tf_search;
        else if(_type.equals("zoomLeft"))
            return this.tf_zoomLeft;
        else if(_type.equals("zoomRight"))
            return this.tf_zoomRight;
        else if(_type.equals("to"))
            return this.tf_to;
        else if(_type.equals("from"))
            return this.tf_from;
        else if(_type.equals("path"))
            return this.tf_path;
        
        return null;
    }
    
    /**
     * Method to get Tables <br />
     * Parameter: main, Info
     * @param String _type
     * @return JTable
     */
    public JTable getTable(String _type)
    {
        if(_type.equals("main"))
            return this.t_Main;
        else if(_type.equals("info"))
            return this.t_Info;
        
        return null;
    }
    
    /**
     * Method to get ScrollPanes <br />
     * Parameter: main, info, picBox
     * @param String _type
     * @return JTable
     */
    public JScrollPane getScrollbar(String _type)
    {
        if(_type.equals("main"))
            return this.s_tMain;
        else if(_type.equals("info"))
            return this.s_tInfo;
        else if(_type.equals("picBox"))
            return this.s_ppicBox;
        
        return null;
    }
    
    /**
     * Method to get Labels <br />
     * Parameter: picBox
     * @param String _type
     * @return JLabel
     */
    public JLabel getLabel(String _type)
    {
        if(_type.equals("picBox"))
            return this.l_picBox;
        
        return null;
    }
    
    public PictureBox getPicBox()
    { return this.p_picBox; }
    
    public int getObject()
    { return this.object; }
    
    /**
     * Method to get RadioButtons <br />
     * Parameter: production, acceptance
     * @param String _type
     * @return JRadioButton
     */
    public JRadioButton getRadioButton(String _type)
    { 
        if(_type.equals("production"))
            return this.rb_production;
        else if(_type.equals("acceptance"))
            return this.rb_acceptance;
        
        return null;
    }
    
    public ButtonGroup getButtonGroup()
    { return this.gr_system; }
    
    public String getLink()
    { return this.link; }
    
    /*      SETTER      */
    /**
     * Method to set Tables <br />
     * Parameter: main, Info
     * @param String _type, JTable _table
     * @return void
     */
    public void setTable(String _type, MainTable _table)
    {
        if(_type.equals("main"))
            this.t_Main = _table;
        else if(_type.equals("info"))
            this.t_Info = _table;
    }
    
    /**
     * Method to set ScrollPanes <br />
     * Parameter: main, info, picBox
     * @param String _type, JScrollPane _scroll
     * @return void
     */
    public void setScrollPane(String _type, JScrollPane _scroll)
    {
        if(_type.equals("main"))
            this.s_tMain = _scroll;
        else if(_type.equals("info"))
            this.s_tInfo = _scroll;
        else if(_type.equals("picBox"))
            this.s_ppicBox = _scroll;
    }
    
    public void setPicBox(PictureBox _picBox)
    { this.p_picBox = _picBox; }
    
    public void setObject(int _obj)
    { this.object = _obj; }
    
    /**
     * Method to set RadioButtons <br />
     * Parameter: production, reduction
     * @param String _type, JRadioButton _button
     * @return void
     */
    public void setRadioButton(String _type, JRadioButton _button)
    { 
        if(_type.equals("production"))
            this.rb_production = _button;
        else if(_type.equals("reduction"))
            this.rb_acceptance = _button;
    }
    
    
    /*      JavaScript METHODS      */
    public void setLink(String _link)
    { 
        /*
        this.link = _link;

        if(this.link.indexOf("?") != -1)
        {
            System.out.println("NICHT LEER");
            
            
            try
            { this.tf_search.setText(this.link.substring(this.link.indexOf("&ok")+4, this.link.indexOf("&zl"))); }
            catch (NullPointerException ex)
            { this.tf_search.setText(this.link.substring(this.link.indexOf("&sk")+4, this.link.indexOf("&zl"))); }
            
            this.tf_zoomLeft.setText(this.link.substring(this.link.indexOf("&zl")+4, this.link.indexOf("&zr")));
            this.tf_zoomRight.setText(this.link.substring(this.link.indexOf("&zr")+4, this.link.indexOf("&to")));
            this.tf_from.setText(this.link.substring(this.link.indexOf("&fo")+4, this.link.length()));
            this.tf_to.setText(this.link.substring(this.link.indexOf("&to")+4, this.link.indexOf("&fo")));
        }*/
    }
    
    
    public void init()
    {
        super.init();
    }
    
    public void start()
    {
        super.start();
    }
    
    public void stop()
    {
        super.stop();
    }
    
    public void destroy()
    {
        super.destroy();;
    }
}
 
S

sognix

Gast
Weitere Möglichkeit die mir gerade eingefallen ist:

Wie ist es mit Applets und Singletonklassen?

Java:
//thread save singleton
    private static Cache INSTANCE = new Cache();

Java:
public static Cache getInstance()
    { return Cache.INSTANCE; }
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
C Applet Applet funktioniert in Eclipse aber nicht in Browser AWT, Swing, JavaFX & SWT 1
M Warum funktioniert mein Applet nicht? AWT, Swing, JavaFX & SWT 6
I Swing .Jar Datei - funktioniert - nun als Applet AWT, Swing, JavaFX & SWT 13
G Grafikformat für AWT-Applet? AWT, Swing, JavaFX & SWT 0
I Applet BlueJ Applet - Bild mit if-Schleife zeichnen lassen AWT, Swing, JavaFX & SWT 16
T Applet Applet in JFrame einbinden AWT, Swing, JavaFX & SWT 8
S Sandboxed Applet weiterhin moeglich..? AWT, Swing, JavaFX & SWT 5
S Oracle's neue Sicherheitseinstellungen zerstoeren mein Applet. Was tun? AWT, Swing, JavaFX & SWT 3
G Applet Applet Komponenten flackern AWT, Swing, JavaFX & SWT 10
U CardLayout im Applet AWT, Swing, JavaFX & SWT 4
J Applet Applet Vererbung/Überladen AWT, Swing, JavaFX & SWT 5
G JavaFX mit ANT deployen als Applet AWT, Swing, JavaFX & SWT 3
S Applet Application 2 applet AWT, Swing, JavaFX & SWT 3
T Applet JTattoo Look and Feel AWT, Swing, JavaFX & SWT 5
T Signiertes Applet Urheber angeben AWT, Swing, JavaFX & SWT 5
S Applet Repaint AWT, Swing, JavaFX & SWT 3
B Java-Applet Parameter übergabe? AWT, Swing, JavaFX & SWT 2
M Applet mit Bildern AWT, Swing, JavaFX & SWT 2
T Applet in JSP einbinden AWT, Swing, JavaFX & SWT 4
R MouseEvent.getX() liefert in Applet Screen-Koordinate AWT, Swing, JavaFX & SWT 2
K Applet Wieso kann ich keine Array im Applet initialisieren AWT, Swing, JavaFX & SWT 13
A Applet Applet vom Web-Server aus aufrufen AWT, Swing, JavaFX & SWT 11
A Applet Applet startet nicht AWT, Swing, JavaFX & SWT 2
P Tatsächliche Größe für Applet AWT, Swing, JavaFX & SWT 3
B Applet Aus Applet signiertes jar mit externen libs erstellen AWT, Swing, JavaFX & SWT 9
S JDialog über Applet AWT, Swing, JavaFX & SWT 3
D Applet hintergrund wird nicht weiß AWT, Swing, JavaFX & SWT 2
R Applet JavaScript Methodenaufruf AWT, Swing, JavaFX & SWT 2
A Applet Animiertes gif in awt applet anzeigen AWT, Swing, JavaFX & SWT 11
X Applet Java Applet Datei Ausführung AWT, Swing, JavaFX & SWT 9
A Applet .gif in applet Image nicht animiert angezeigt AWT, Swing, JavaFX & SWT 4
A Applet Applet aus Code neu starten AWT, Swing, JavaFX & SWT 2
K Applet erkennt keine Frameverkleinerung AWT, Swing, JavaFX & SWT 5
T Applet Applet vs. WebStart AWT, Swing, JavaFX & SWT 4
S Applet starten AWT, Swing, JavaFX & SWT 4
K JTable im Browser nicht zu sehen - Applet AWT, Swing, JavaFX & SWT 6
B Applet Button oder Toolbar in einem Applet AWT, Swing, JavaFX & SWT 5
V Applet mit Bildbearbeitung AWT, Swing, JavaFX & SWT 3
V Applet Applet starten schlägt fehl AWT, Swing, JavaFX & SWT 2
W Button in Applet AWT, Swing, JavaFX & SWT 9
kniffel GUI-Applet JTable füllt Hintergrund völlig aus AWT, Swing, JavaFX & SWT 4
J Applet Java-Applet friert mit Firefox ein AWT, Swing, JavaFX & SWT 8
J Applet Tetris flackert AWT, Swing, JavaFX & SWT 9
F Applet Applet starten...(+Timer?) AWT, Swing, JavaFX & SWT 12
S [JAVA] JFrame in Applet/JApplet AWT, Swing, JavaFX & SWT 14
D Applet Applet das auf fremden Libraries basiert einbinden? AWT, Swing, JavaFX & SWT 20
M Applet wird nicht angezeigt AWT, Swing, JavaFX & SWT 2
M JMenuBar im Applet und paint AWT, Swing, JavaFX & SWT 9
E Applet Neuen Tab aus Applet öffnen AWT, Swing, JavaFX & SWT 3
G Applet, Link ermitteln, dem der Benutzer gefolgt ist AWT, Swing, JavaFX & SWT 2
K Email versenden ueber Applet AWT, Swing, JavaFX & SWT 11
S Applet in JFrame einbinden AWT, Swing, JavaFX & SWT 6
S Button aktivieren (Applet) AWT, Swing, JavaFX & SWT 2
3 Applet Applet zeigt nur weiße Fläche AWT, Swing, JavaFX & SWT 15
B 2 Probleme (JFrame & Applet) AWT, Swing, JavaFX & SWT 7
A Programmieren einer Agenda mit einer Liste (als Applet und .txt zum Speichern) AWT, Swing, JavaFX & SWT 7
H applet Methode aus abstrakter Klasse aufrufen AWT, Swing, JavaFX & SWT 12
H Applet - Hilfedateien im Browser öffnen / eine Webseite laden AWT, Swing, JavaFX & SWT 6
O JPanel aus Applet starten AWT, Swing, JavaFX & SWT 3
O Applet-Steuerung mit Tastaturbefehlen AWT, Swing, JavaFX & SWT 3
F 4-Gewinnt als Applet AWT, Swing, JavaFX & SWT 24
F Applet vs Stand-Alone-Client AWT, Swing, JavaFX & SWT 3
B AWT Bild als Hintergrund im Applet AWT, Swing, JavaFX & SWT 2
D Probleme mit MouseWheelListener und JLayeredPane in Applet AWT, Swing, JavaFX & SWT 2
G Applet und Swing Anwendung AWT, Swing, JavaFX & SWT 2
S Applet - Aerger mit dem Hintergrundbild - JLabel und JTextfield AWT, Swing, JavaFX & SWT 7
F Applet zeigt Bilder nicht an AWT, Swing, JavaFX & SWT 5
R for-Schleife in Applet ausgeben AWT, Swing, JavaFX & SWT 3
S Bild wird auf Canvas in Applet nicht gezeichnet AWT, Swing, JavaFX & SWT 4
W Swing heapsort + Applet AWT, Swing, JavaFX & SWT 4
P Diagramm in einem Applet zeichnen AWT, Swing, JavaFX & SWT 4
M Java Applet JTable/JList AWT, Swing, JavaFX & SWT 6
L Einfache Layout Frage für Applet -> Was mache ich bloss falsch? AWT, Swing, JavaFX & SWT 2
K Alternative zu Applet mit HTML-Einbindung AWT, Swing, JavaFX & SWT 11
J Java-Applet beenden AWT, Swing, JavaFX & SWT 3
R Applet aus JFrame starten AWT, Swing, JavaFX & SWT 2
T Konfiguration speichern in Applet AWT, Swing, JavaFX & SWT 2
P Swing Roter Faden beim Applet GUI Programmieren AWT, Swing, JavaFX & SWT 2
T HTML Seite neu laden mittels Applet AWT, Swing, JavaFX & SWT 2
T Icon von Frame ändern - Applet AWT, Swing, JavaFX & SWT 2
T Java Applet beenden AWT, Swing, JavaFX & SWT 2
M Swing Butten & TextFields aus Applet im JFrame nicht sichtbar AWT, Swing, JavaFX & SWT 2
S Applet mit Graphics dynamisch vergrößern AWT, Swing, JavaFX & SWT 3
M AWT text im applet formatieren AWT, Swing, JavaFX & SWT 5
L Applet Frage AWT, Swing, JavaFX & SWT 25
1 Verständnisprobleme bei Java Applet AWT, Swing, JavaFX & SWT 13
B Unterschied JFrame/Applet AWT, Swing, JavaFX & SWT 12
T [Applet] startet in Eclipse aber nicht im Browser AWT, Swing, JavaFX & SWT 2
G JSlider in Applet AWT, Swing, JavaFX & SWT 4
P Swing Applet AWT, Swing, JavaFX & SWT 2
R problem mit bildanzeige in applet und main AWT, Swing, JavaFX & SWT 2
A Applet kommt offline nicht mit FileReader zurecht AWT, Swing, JavaFX & SWT 3
F Applet und Popup AWT, Swing, JavaFX & SWT 4
G Wie startet man ein Applet ? AWT, Swing, JavaFX & SWT 4
R Ein Applet von einem Applet öffnen lassen AWT, Swing, JavaFX & SWT 2
Z Applet ausblenden AWT, Swing, JavaFX & SWT 5
G JList wird in einem Applet nur teilweise aktualisiert AWT, Swing, JavaFX & SWT 12
P Applet darstellung von Textfeldern Problem AWT, Swing, JavaFX & SWT 3
I Applet --> neues Fenster öffnen AWT, Swing, JavaFX & SWT 11
I Applet mit Panels (so richtig, gehts besser?) AWT, Swing, JavaFX & SWT 3

Ähnliche Java Themen

Neue Themen


Oben