@Override
	public void delete() {
		if (this.getComponentCount() > 0 || this.wires.size() > 0 || this.interwires.size() > 0) {
			Object[] options = { "Yes", "No" };
			int n = JOptionPane.showOptionDialog(JOptionPane.getFrameForComponent(this), "The selected Board is not empty.\nAre sure you want to delete it?", "WARNING", 0, 2, null, options, options[1]);

			if (n == 0) {
				int maxi = this.wires.size();
				for (int i = 0; i < maxi; i++) {
					Wire wire = (Wire) this.wires.getFirst();
					wire.delete();
					this.wires.remove(wire);
				}
				maxi = this.interwires.size();
				for (int i = 0; i < maxi; i++) {
					Wire wire = (Wire) this.interwires.getFirst();
					wire.delete();
					this.interwires.remove(wire);
				}
				this.circuit.remove(this);
				this.circuit.repaint();
				this.circuit.BBselect = null;
			}
		} else {
			this.circuit.remove(this);
			this.circuit.repaint();
			this.circuit.BBselect = null;
		}
	}