Auf Thema antworten

Hab doch schon geschrieben das nichts angezeigt wird ;)

(Also auch keine Fehlermeldung)

appletviewer zeigt auch nichts an.


Die Klasse mit meiner JApplet sieht so aus:


[code=Java]

package View;


import java.awt.BorderLayout;


import javax.swing.JApplet;

import javax.swing.JPanel;


public class MeineApp extends JApplet implements Runnable {

    private static final long serialVersionUID = 001;

    private Thread th;

   

    private int width = 1024;

    private int height = 520;

   

    private MenuList menuList = new MenuList();

    private MenuBar menuBar = new MenuBar();

    private Changer changer = new Changer();

   

    // *********************************************************************

    public void init() {

        this.setSize(width, height);

        this.setLayout(new BorderLayout());

        this.setJMenuBar(menuBar.getMenuBar());

        menuList.getList().addListSelectionListener(changer);

        this.add(menuList.getScrollList(), BorderLayout.WEST);

        this.add(new JPanel(), BorderLayout.NORTH);        // Platzhalter

        this.add(new JPanel(), BorderLayout.SOUTH);        // Platzhalter

        this.add(changer.getMainPanel(), BorderLayout.CENTER);

    }

   

    // *********************************************************************

    public void start() {

        th = new Thread(this);

        th.start();

    }

   

    // *********************************************************************

    public void stop() {}

   

    // *********************************************************************

    public void destroy() {}

   

    // *********************************************************************

    public void update() {}

   

    // *********************************************************************

    public void run() {

       

        while(true) {

           

            repaint();


            try {

                Thread.sleep(10);

            } catch(InterruptedException e) {}

        }

    }

}

[/code]



Oben