package beaform.gui.main;

import java.awt.BorderLayout;
import java.awt.Component;

import javax.swing.JPanel;
import javax.swing.JScrollPane;

import beaform.gui.debug.DebugUtilities;

/**
 * This class represents the main panel where all views will work in.
 *
 * @author Steven Post
 *
 */
public final class MainPanel extends JPanel {

	private static final long serialVersionUID = 1207348877338520359L;

	/** An inner panel for the actual content */
	private final JPanel panel = new JPanel(new BorderLayout());
	private final JScrollPane scrollPane = new JScrollPane(this.panel);

	public MainPanel() {
		super(new BorderLayout());
		this.add(this.scrollPane);
	}

	public void replaceActiveWindow(final Component comp) {
		if (this.panel.getComponentCount() > 0) {
			this.panel.remove(0);
		}
		this.panel.add(comp);
		this.panel.revalidate();
	}

	public void enableDebugBorders() {
		DebugUtilities.drawBorders(this.panel);
	}

}

@@ -138,16 +138,66 @@
 lPane;%0A%0A
+import beaform.gui.InterchangableWindowDisplayer;%0A
 import b
@@ -381,16 +381,57 @@
  JPanel 
+implements InterchangableWindowDisplayer 
 %7B%0A%0A%09priv
@@ -752,24 +752,35 @@
 lPane);%0A%09%7D%0A%0A
+%09@Override%0A
 %09public void

Implement the ICWD interface in the main panel