001package net.minecraft.client;
002
003import cpw.mods.fml.relauncher.Side;
004import cpw.mods.fml.relauncher.SideOnly;
005import java.awt.Canvas;
006
007@SideOnly(Side.CLIENT)
008public class CanvasMinecraftApplet extends Canvas
009{
010    /** Reference to the MinecraftApplet object. */
011    final MinecraftApplet mcApplet;
012
013    public CanvasMinecraftApplet(MinecraftApplet par1MinecraftApplet)
014    {
015        this.mcApplet = par1MinecraftApplet;
016    }
017
018    public synchronized void addNotify()
019    {
020        super.addNotify();
021        this.mcApplet.startMainThread();
022    }
023
024    public synchronized void removeNotify()
025    {
026        this.mcApplet.shutdown();
027        super.removeNotify();
028    }
029}