/* ComPanel.java */ package ciips.animation; import java.awt.*; import java.applet.*; import java.io.*; /** * Commentary panel, which only consists of a few rows of texts in the form * of java.awt.Label. * The number of text labels are set during the class construction. *

* In this particular implemetation, the commentary panel is displayed as * the footer of the window frame. * @see AlgAnimFrame */ public class ComPanel extends Panel { private Label[] com; private static final boolean DEBUG = true; /** * Creates a commentary panel based on the initial comment and number * of text fields specified by the parameters. * @param s Normally the algorithm's name. This parameter will be * displayed on the first line of the text fields as "Running " + s. * @param n_lines The number of text fields to be created on this * commentary panel. */ public ComPanel( String s, int n_lines ) { if ( DEBUG ) System.out.println("ComPanel " + n_lines + " lines"); com = new Label[n_lines]; setLayout(new GridLayout(0,1)); int i; this.setBackground(Color.white); for (i=0;i