package chronoDivers;

import java.awt.FlowLayout;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class ButtonTabComponent extends JPanel
{
	private static final long serialVersionUID = 1L;
	private JLabel titleLabel;
  
	public ButtonTabComponent(String title, int index)
	{
		super(new FlowLayout(0, 0, 0));
    
		setOpaque(false);
    
		this.titleLabel = new JLabel(title);
		add(this.titleLabel);
    
		this.titleLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 2));
    
		TabButton button = new TabButton(this);
		add(button);
    
		setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0));
	}
  
	public void changeTitle(String title)
	{
		this.titleLabel.setName(title);
	}
}
