Back to index

wims  3.65+svn20090927
MyLabel.java
Go to the documentation of this file.
00001 package rene.gui;
00002 
00003 import java.awt.Container;
00004 import java.awt.Graphics;
00005 import java.awt.Label;
00006 
00011 public class MyLabel extends Label
00012 {   public MyLabel (String s)
00013     {   super(s);
00014         if (Global.NormalFont!=null) setFont(Global.NormalFont);
00015     }
00016     public MyLabel (String s, int allign)
00017     {   super(s,allign);
00018         if (Global.NormalFont!=null) setFont(Global.NormalFont);
00019     }
00023     public void paint (Graphics g)
00024     {  Container c=getParent();
00025        if (c!=null) setBackground(c.getBackground());
00026        super.paint(g);
00027     }
00028 }