super("DrawStringDemo");
JFrame frame = new DrawStringDemo(); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) {System.exit(0);} }); frame.pack(); frame.setVisible(true);
Graphics2D graphics2D = (Graphics2D)g; GraphicsEnvironment.getLocalGraphicsEnvironment(); Font font = new Font("LucidaSans", Font.PLAIN, 40); graphics2D.setFont(font); graphics2D.drawString(message, 50, 75);