Maybe too obvious, but did you import java.awt.Font?
Change it to
Code:
java.awt.Font f = new java.awt.Font("Arial", java.awt.Font.BOLD | java.awt.Font.ITALIC, 20);
JTextArea canvas = new JTextArea(30,70);
canvas.setFont(f);
and see if it complains about the first line.
__________________
"Prohibition will work great injury to the cause of temperance. It is a species of intemperance within itself, for it goes beyond the bounds of reason in that it attempts to control a man's appetite by legislation, and makes a crime out of things that are not crimes. A Prohibition law strikes a blow at the very principles upon which our government was founded." --Abraham Lincoln
Last edited by n0nsensical; 02-23-2006 at 09:43 PM..
|