FileDocCategorySizeDatePackage
OReillyLogoApplet.javaAPI DocExample3220Mon Jan 15 14:00:20 GMT 2001None

OReillyLogoApplet

public class OReillyLogoApplet extends Applet

Fields Summary
private ImageArea
imageArea
private Image
logo
private Button
okButton
private ListResourceBundle
appletElements
private Locale
logoAppletLocale
private boolean
displayURLLogo
Constructors Summary
Methods Summary
public voidinit()


    // Get the parameters to set the locale for the applet
    logoAppletLocale = new Locale(getParameter("language"),
                                  getParameter("country"));
    if (getParameter("url") != null &&
        getParameter("url").equalsIgnoreCase("yes"))
      displayURLLogo = true;
    else
      displayURLLogo = false;

    try {

      setLayout(new BorderLayout());

      imageArea = new ImageArea();
      imageArea.setBackground(Color.white);
      imageArea.setSize(getSize().width, getSize().height);

      appletElements = (ListResourceBundle)ResourceBundle.
         getBundle("OReillyResources", logoAppletLocale);
      if (displayURLLogo)
        logo = Toolkit.getDefaultToolkit()
        .createImage((byte [])appletElements
        .getObject("OReillyLogoURL"));
      else
        logo = Toolkit.getDefaultToolkit()
               .createImage((byte [])appletElements
               .getObject("OReillyLogo"));

      add("North", imageArea);

      imageArea.displayImage(logo);

    } catch (MissingResourceException e) {
    }