/** Initiation of the GUI. */ public void initGui() { int margin = 5; int yMargin = 0; int yCorrection = 0; gpsIcon = new GpsIndicator(ctx); gpsIcon.setX(screenWidth - (gpsIcon.getImage().getWidth() + margin)); gpsIcon.setY(margin); gpsIcon.updateLayout(); yMargin = gpsIcon.getImage().getHeight() + margin; radar = new Radar(ctx, this); radar.setX(getScreenWidth() - (radar.getImage().getWidth() + margin)); radar.setY(getScreenHeight() - (radar.getImage().getHeight() + margin)); radar.updateLayout(); yCorrection = radar.getImage().getHeight() + 2 * margin + yMargin; rightSlide = new SlideBar(ctx, this); rightSlide.setX(getScreenWidth() - (rightSlide.getImage().getWidth())); rightSlide.setY( ((getScreenHeight() - yCorrection) / 2) - (rightSlide.getImage().getHeight() / 2) + yMargin); rightSlide.updateLayout(); titleBar = new TitleBar(ctx, this); titleBar.setX(getLeft()); titleBar.setY(getTop()); titleBar.updateLayout(); poiReinit = new ReplacePoi(ctx, this); poiReinit.setX(margin); poiReinit.setY(getScreenHeight() - (poiReinit.getImage().getHeight() + margin)); poiReinit.updateLayout(); yCorrection = poiReinit.getImage().getHeight() + 2 * margin + yMargin; splash = new SplashScreen(ctx, getScreenWidth(), getScreenHeight()); splash.setX(0); splash.setY(0); splash.updateLayout(); }