/**************** * Name: Koh Wei Jie * * Purpose of this file: To define a fixed-size GUI panel class that inherits from JPanel. * ****************/ import java.awt.*; import javax.swing.*; public class FixedSizeJPanel extends JPanel{ private Dimension size; public FixedSizeJPanel(Dimension size){ super(); this.size = size; } public FixedSizeJPanel(int width, int height){ super(); this.size = new Dimension(width, height); } public Dimension getMinimumSize(){ return this.size; } public Dimension getMaximumSize(){ return this.size; } public Dimension getPreferredSize() { return this.size; } }