import java.awt.*; import java.awt.event.*; import javax.swing.*; /** To experiment with attributed text in scrolling pane. * This is the top-level frame. * There is an overridden JPanel that does the drawing, TextPanel. * @author Bob Futrelle * @version 0.1 of 1/24/2003 */ class TextPanel extends JPanel { Graphics2D g2; public void paintComponent(Graphics g) { super.paintComponent(g); g2 = (Graphics2D)g; for(int i = 0; i < 50; i++) { g2.drawString("Line " + i, 10, 20*(i+1)); } } }