VsHardButton.java :  » Game » openfield » battlefield » ui » component » Java Open Source

Java Open Source » Game » openfield 
openfield » battlefield » ui » component » VsHardButton.java
/*
 *--------------------------------------------------------------------------
 *   Battlefield - A Realtime Network Multiplayer Game
 *   =======================================================
 *   Developed by Group D02 - 2009/2010 Semester 4 - CS2103
 *     Harry Nguyen Duy Hoang <nnduyhoang@yahoo.co.uk>
 *     Kent Chng Siang Rong <fivefootway@gmail.com>
 *     Lim Yong Peng <limpeng1986@gmail.com>
 *     Loh Xiankun <u0807185@nus.edu.sg>
 *   Instructed by
 *     Dr. Damith C.Rajapakse <damith@gmail.com>
 *   =======================================================
 *   $Id: VsHardButton.java 582 2010-07-26 13:42:09Z Kent $
 *   $LastChangedDate: 2010-07-26 06:42:09 -0700 (Mon, 26 Jul 2010) $
 *   $LastChangedBy: Kent $
 *--------------------------------------------------------------------------
 */
package battlefield.ui.component;

import battlefield.resource.Graphics;
import java.awt.Dimension;
import java.awt.Insets;
import javax.swing.ImageIcon;

/**
 *
 * @author Yong Peng
 */
public class VsHardButton extends GameToggleButton{

    public VsHardButton() {
        this.setFocusPainted(false);
        this.setBorderPainted(false);
        this.setContentAreaFilled(false);
        this.setMargin(new Insets(0, 0, 0, 0));
        this.setOpaque(false);
        this.setIcon(new ImageIcon(Graphics.BUTTON_VS_HARD.resize(200, 200).getImage()));
        this.setNormalImage(Graphics.BUTTON_VS_HARD.resize(WIDTH, HEIGHT).getImage());
        this.setHoverImage(Graphics.BUTTON_VS_HARD.resize(WIDTH, HEIGHT).getImage());
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.