DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3

Thread: getGraphics();

  1. #1
    Bavo Bruylandt Guest

    getGraphics();


    I wrote a whole class to produce gradients wich uses DoubleBuffering.
    If I use within an applet everyting works fine, but when I stick the method
    (public Image Impaint()) the getGraphics() line always delivers a NullPointerException.

    Anyone an idea?


  2. #2
    gautam Guest

    Re: getGraphics();


    NullPointerException generally occurs when memory is not allocated to something.
    Check if you have allotted memory to all those fields.


    "Bavo Bruylandt" <Bavo.Bruylandt@rug.ac.be> wrote:
    >
    >I wrote a whole class to produce gradients wich uses DoubleBuffering.
    >If I use within an applet everyting works fine, but when I stick the method
    >(public Image Impaint()) the getGraphics() line always delivers a NullPointerException.
    >
    >Anyone an idea?
    >



  3. #3
    Mo Guest

    Re: getGraphics();


    try to run once the repaint() methode and then everytime the other...I think
    repaint has to run one time before the getGraphics() function is enabled


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links