Results 1 to 2 of 2
  1. #1
    qwerty53's Avatar
    qwerty53 is offline Member
    Join Date
    Jul 2011
    Rep Power

    Question printAccoıunt Function

    I can't see what is wrong in this code... Can you help me, guys ?

    Java Code:
        private void printAccount() {
            PrinterJob pj = PrinterJob.getPrinterJob();
            pj.setJobName(" Print Component ");
            pj.setPrintable (new Printable() {    
            public int print(Graphics pg, PageFormat pf, int pageNum){
            if (pageNum > 0){
                return Printable.NO_SUCH_PAGE;
            }Graphics2D g2 = (Graphics2D) pg;
            g2.translate(pf.getImageableX(), pf.getImageableY());
            Account_name.paint(g2);                     // netbeans says "cannot  find symbol" right here. 
            return Printable.PAGE_EXISTS;
        if (pj.printDialog() == false)

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power


    Chances are Account_name doesn't have a method paint that takes a Graphics2D argument.


Similar Threads

  1. Calling function in Javascript- from other function
    By jdigger in forum New To Java
    Replies: 1
    Last Post: 02-27-2011, 09:00 PM
  2. Does this function cause lag?
    By Addez in forum New To Java
    Replies: 5
    Last Post: 12-06-2009, 10:53 AM
  3. Replies: 3
    Last Post: 12-04-2009, 03:08 PM
  4. Need help with get function
    By calicocal in forum New To Java
    Replies: 10
    Last Post: 11-09-2008, 07:59 PM
  5. Need a little help with a function!
    By Nuluvius in forum New To Java
    Replies: 3
    Last Post: 02-07-2008, 11:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts