// Copyright 1996, David Neto import java.awt.*; import java.util.*; public class BarPanel extends Panel { GridBagLayout gridBag; GridBagConstraints c; int maxValue; Vector bars; void initGridBag() { gridBag = new GridBagLayout(); setLayout(gridBag); c = new GridBagConstraints(); c.weighty = 1.0; c.gridheight = GridBagConstraints.REMAINDER; c.anchor = GridBagConstraints.SOUTH; } public BarPanel() { initGridBag(); bars = new Vector(); setMaxValue(15); // No reason; just an example. } public BarPanel(int maxValue, int num) { initGridBag(); bars = new Vector(num); setMaxValue(maxValue); for (int i=0; i