-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.0
-
sparc
-
generic
I'm trying to slightly enlarge the default font, whatever it is.
This is quite possibly bogus, but anyway....
No matter where I do a getFont(), it returns null. I've tried
it in the init(), start(), and main() methods of my application
(which theoretically could also run as an applet).
public class GUI extends Applet { . . .
public static void main(String args[]) {
Frame f = new Frame("GUI");
GUI gui = new GUI();
gui.init();
gui.start();
Font oldFont = gui.getFont();
if (oldFont == null) {
System.out.println("Eek! font is null!");
} else {
gui.setFont(new Font(oldFont.getFamily(), oldFont.getStyle(),
oldFont.getSize()+2));
}
. . .
This is quite possibly bogus, but anyway....
No matter where I do a getFont(), it returns null. I've tried
it in the init(), start(), and main() methods of my application
(which theoretically could also run as an applet).
public class GUI extends Applet { . . .
public static void main(String args[]) {
Frame f = new Frame("GUI");
GUI gui = new GUI();
gui.init();
gui.start();
Font oldFont = gui.getFont();
if (oldFont == null) {
System.out.println("Eek! font is null!");
} else {
gui.setFont(new Font(oldFont.getFamily(), oldFont.getStyle(),
oldFont.getSize()+2));
}
. . .