// Read a file containing rectangle paint commands // and draw them in a Drawing Panel // See RectanglePainter.java for final solution // Step 0: Read first line of file import java.util.*; import java.io.*; public class Paint0 { public static void main(String[] args) throws FileNotFoundException { Scanner fileScan = new Scanner(new File("simplepic.dat")); int width = fileScan.nextInt(); int height = fileScan.nextInt(); System.out.println("width: " + width + ", " + height); } }