Part of a simple Java application I have draws out two strings within a frame. The first string is rendered, however, the second is not.
import java.awt.*;
//Begin troublesome section
class NewFrame extends Frame {
public void paint (Graphics g)
{
g.drawString ("Foo", 70, 70);
}
public void paint2 (Graphics g)
{
g.drawString ("Bar", 600, 600);
}
}
//End troublesome section
public class FooBar {
public static void main (String[] argv)
{
NewFrame nf = new NewFrame ();
nf.setTitle ("Foo Bar");
nf.setResizable (true);
nf.setBackground (Color.cyan);
nf.setSize (700, 700);
nf.setVisible (true);
}
}
The part of the code in question is what is noted as the "troublesome section".