| StockFrame.java |
package net;
import java.awt.*;
public class StockFrame extends Frame {
public static void main(String args[]) {
StockFrame
sf
= new StockFrame();
sf.init();
}
public void init() {
addPanels();
setLayout(new GridLayout(0, 5, 10, 10));
pack();
setVisible(true);
}
public void addPanels() {
for (int i = 0; i < 10; i++) {
add(
new StockPanel());
}
}
public class StockPanel extends Panel {
StockPanel() {
setLayout(new GridLayout(0, 1));
add(new Label("b 100$"));
add(new Label("a 150$"));
}
}
}