1 Reply Latest reply: Jan 7, 2005 6:57 AM by 416044 RSS

    GraphicEnvironment - Font - Error

    807596
      hello

      in my program i write following code

      class test
      {

      private static void gg() {
      GraphicsEnvironment grenv = GraphicsEnvironment.getLocalGraphicsEnvironment();
      Font[] fonts = grenv.getAllFonts();
      System.out.println("--- Available fonts ---");
      for (int i=0; i<fonts.length; i++) {
      System.out.println(" " + i + " = " + fonts.getFontName()
      + " [" + fonts[i].getFamily() + "]");

      }
      }

      compile this code following error occur
      1. class GraphicEnvironment not found
      2. method getFontName() not found

      what can i do

      pl help me
      rafik