String imagesPath = this.getClass().getPackage().getName()+".";
String imagesPath = org.smartfrog.examples.dynamicwebserver.gui.graphpanel.GraphPanel.class.getPackage().getName()+".";
    public void initImages() {        try {            String imagesPath = this.getClass().getPackage().getName()+".";            imagesPath=imagesPath.replace('.','/');//            topBar = java.awt.Toolkit.getDefaultToolkit().getImage(org.smartfrog.examples.dynamicwebserver.gui.graphpanel.GraphPanel.class.getResource(//                        "top.gif"));//            bottomBar = java.awt.Toolkit.getDefaultToolkit().getImage(org.smartfrog.examples.dynamicwebserver.gui.graphpanel.GraphPanel.class.getResource(//                        "bottom.gif"));            //middleBar = java.awt.Toolkit.getDefaultToolkit().getImage(org.smartfrog.examples.dynamicwebserver.gui.graphpanel.GraphPanel.class.getResource(//                        "middle.gif"));//            backgroundImage = java.awt.Toolkit.getDefaultToolkit().getImage(org.smartfrog.examples.dynamicwebserver.gui.graphpanel.GraphPanel.class.getResource(//                        "background.gif"));            topBar = createImage(imagesPath+"top.gif");            bottomBar = createImage(imagesPath+"bottom.gif");            middleBar = createImage(imagesPath+"middle.gif");            backgroundImage = createImage(imagesPath+"background.gif");            try {                MediaTracker tracker = new MediaTracker(this);                tracker.addImage(topBar, 0);                tracker.addImage(middleBar, 1);                tracker.addImage(bottomBar, 2);                tracker.waitForID(0, 5000);                tracker.waitForID(1, 5000);                tracker.waitForID(2, 5000);            } catch (InterruptedException iex) {                iex.printStackTrace();            }        } catch (Exception e) {            e.printStackTrace();        }    }