コード例 #1
0
    private void init() {
      credits.add(new CreditsEntry(true, "Programmierung"));
      credits.add(new CreditsEntry(false, "Maj0r"));
      credits.add(new CreditsEntry(false, "([email protected])"));
      credits.add(new CreditsEntry(false, "loevenwong"));
      credits.add(new CreditsEntry(false, "([email protected])"));
      credits.add(new CreditsEntry(true, "Besonderen Dank an"));
      credits.add(new CreditsEntry(false, "muhviehstarr"));
      credits.add(new CreditsEntry(true, "Banner & Bilder"));
      credits.add(new CreditsEntry(false, "saschxd"));
      credits.add(new CreditsEntry(true, "Übersetzung"));
      credits.add(new CreditsEntry(false, "BlueTiger"));
      credits.add(new CreditsEntry(false, "nurseppel"));
      credits.add(new CreditsEntry(true, "Kontakt"));
      credits.add(new CreditsEntry(false, "irc.devStaff.net:6667"));
      credits.add(new CreditsEntry(false, "#applejuice"));
      credits.add(new CreditsEntry(false, "www.applejuicenet.de"));

      backgroundImage = IconManager.getInstance().getIcon("applejuiceinfobanner").getImage();
      flagge = IconManager.getInstance().getIcon("deutsch").getImage();
      MediaTracker mt = new MediaTracker(this);

      mt.addImage(backgroundImage, 0);
      try {
        mt.waitForAll();
      } catch (InterruptedException x) {

        // kein Bild da, dann kack drauf ;-)
      }

      version.setText(
          "Version " + AppleJuiceDialog.GUI_VERSION + "/" + ApplejuiceFassade.FASSADE_VERSION);
      Font font = version.getFont();

      font = new Font(font.getName(), Font.PLAIN, font.getSize());
      version.setFont(font);
      setLayout(new BorderLayout());
      TKLPanel panel1 = new TKLPanel(new FlowLayout(FlowLayout.RIGHT));

      panel1.add(version);
      panel1.setOpaque(false);
      add(panel1, BorderLayout.SOUTH);
    }
コード例 #2
0
    public void paintComponent(Graphics g) {
      super.paintComponent(g);

      Color saved = g.getColor();

      g.setColor(getBackground());
      g.fillRect(0, 0, getWidth(), getHeight());
      g.setColor(saved);

      if (backgroundImage != null) {
        int imageX = (getWidth() - backgroundImage.getWidth(this)) / 2;
        int imageY = (getHeight() - backgroundImage.getHeight(this)) / 2;

        g.drawImage(backgroundImage, imageX, imageY, this);
        if (flagge != null) {
          g.drawImage(flagge, backgroundImage.getWidth(this) - flagge.getWidth(this), 0, this);
        }
      }
    }