import java.awt.*;

public class WideList extends List {
	int cols;

	public WideList(int cols){
		this.cols = cols;
	}

	public WideList(int  rows, int cols, boolean  multipleSelections) {
		super(rows, multipleSelections);
		this.cols = cols;
	}

	public Dimension getPreferredSize() {
		Dimension d = super.getPreferredSize();
		FontMetrics fm = getFontMetrics(getFont());
		d.width = cols * fm.charWidth('W');
		return d;
    }
}
