/*
 * @(#)ZSplashPanel.java
 *
 * Copyright 2001 by Intelligent Technology Inc. All rights reserved.
 */
package jp.co.iti.fagot;

import java.awt.Dimension;
import java.awt.BorderLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.ImageIcon;
import javax.swing.SwingConstants;

import javax.swing.border.CompoundBorder;
import javax.swing.border.EmptyBorder;
import javax.swing.border.BevelBorder;
import javax.swing.border.SoftBevelBorder;

import java.net.URL;

/**
 * お待たせウィンドウに表示するパネル
 *
 * @author  福島康治
 * @version 1.01 2001/01/07
 */
public class ZSplashPanel extends JPanel {
	/**
	 * コンストラクタ
	 * @param szURL 表示イメージのURL
	 * @param szLabel 表示文字
	 */
	public ZSplashPanel( String szURL,String szLabel ){
		setLayout(new BorderLayout());
		URL url = null;
		if ( szURL != null ) {
			url = getClass().getResource( szURL );
		}
		if(url != null)
		{
			add(new JLabel(new ImageIcon(url)),BorderLayout.CENTER);
		}
		
		add(new JLabel(szLabel,SwingConstants.CENTER),
					BorderLayout.SOUTH);
		setBorder(new CompoundBorder(
			new SoftBevelBorder(BevelBorder.RAISED),
			new CompoundBorder(new EmptyBorder(2,2,2,2),
			new SoftBevelBorder(BevelBorder.LOWERED))));
	}
}
