package Functions;
import javax.swing.*;
import javax.swing.border.*;

import Elements.Element;

import java.awt.*;

public class ElementPanel extends JPanel 
{
	private Element element;
	
	public ElementPanel(Element element)
	{
		this.element = element;
		if(element != null)
		{
			String name = element.getSymbol();
			if(element.getName().equals("Lanthanum"))
			{
				name = "*" + name;
			}
			if(element.getName().equals("Barium"))
			{
				name += "*";
			}
			if(element.getName().equals("Actinium"))
			{
				name = "**" + name;
			}
			if(element.getName().equals("Radium"))
			{
				name += "**";
			}
			
			add(new JLabel(name));
			setBorder(new CompoundBorder(new LineBorder(Color.BLACK, 1), new EmptyBorder(6, 6, 6, 6)));
		}
	}
	
	public Element getElement()
	{
		return element;
	}
}

@@ -619,27 +619,612 @@
 %0A%09%09%09
-add(new JLabel(name
+this.setLayout(new GridBagLayout());%0A%09%09%09GridBagConstraints c = new GridBagConstraints();%0A%09%09%09c.ipady = -5;%0A%09%09%09c.gridy = 0;%0A%09%09%09add(new JLabel(%22%22 + element.getNum()), c);%0A%0A%09%09%09c.gridy = 1;%0A%09%09%09add(new JLabel(%22%3Chtml%3E%3Ch3%3E%22 + name + %22%3C/h3%3E%3C/html%3E%22), c);%0A%09%09%09%0A%09%09%09c.gridy = 2;%0A%09%09%09c.ipady = 0;%0A%09%09%09add(new JLabel(%22%3Chtml%3E%3Cfont size=%5C%221%5C%22%3E%22 + element.getName() + %22%3C/font%3E%3C/html%3E%22), c);%0A%09%09%09%0A%09%09%09setBorder(new CompoundBorder(new LineBorder(Color.BLACK, 1), new EmptyBorder(3, 3, 3, 3)));%0A%09%09%09%0A%09%09%09/*add(new JLabel(%22%3Chtml%3E%22 + element.getNum() + %22%3Cbr%3E%3Ccenter%3E%3Ch1%3E%22 + name + %22%3C/h1%3E%3Cbr%3E%22 + element.getName() + %22%3C/center%3E%3C/html%3E%22
 ));%0A
@@ -1318,16 +1318,38 @@
 , 6)));%0A
+%09%09%09setSize(50, 50);*/%0A
 %09%09%7D%0A%09%7D%0A%09

Revert "Revert "Made the periodic table different""