001 package net.minecraft.client;
002
003 import cpw.mods.fml.relauncher.Side;
004 import cpw.mods.fml.relauncher.SideOnly;
005 import java.awt.Canvas;
006
007 @SideOnly(Side.CLIENT)
008 public 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 }