🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15014

Java Printing

#15014
From: KYLui
Date: Mon, 12 Jul 1999 00:00
38 lines
1325 bytes
I read from a file using BufferedReader...
I can read the file but i can't print it out to printer why ??
i can print the statement why ???
thanks....

----------------------coding------------------------------------
 public JavaPrinting ()
  {
    try
    {
      in = new BufferedReader (new FileReader("TestReport.txt"));
    }
    catch (IOException e)
    {}
  }

public void paint(Graphics g)
  {
    Font  f = new Font("Monospaced",Font.PLAIN,12);
    g.setFont (f);
    String s = new String();
    int x = 20;
    int y = 20;
    try
    {
      while ((s = in.readLine ()) != Null)
      {
        g.drawString(s, x, y);                        // can't print why
????
        y = y + 10;
      }
    }
    catch (IOException e)
    {
      System.out.println ("Read Error");
    }
    g.drawString("Hello", 30, 30)         // can print Hello
  }
Technical Details
Message-ID: <7mahjo$p285@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,dba916c4c8f7665e,start
X-Google-Attributes: gidf74b3,public
From: "KYLui" <kll@hkstar.com>
Subject: Java Printing
Date: 1999/07/12
Message-ID: <7mahjo$p285@forums.borland.com>
X-Deja-AN: 499797230
Organization: Another Netscape Collabra Server User
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
Newsgroups: borland.public.jbuilder.java.language