🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #2824

[java] getGraphics van JPanel

#2824
From: Passero
Date: Tue, 09 Mar 2004 18:37
15 lines
1601 bytes
Wanneer ik de Graphics van een bestaand JPanel ophaal dan krijg ik altijd
een nullPointerException. Iemand enig idee hoe dat zou komen?
Mijn code ziet er zo uit:

JPanel paneel = new JPanel(null);
Graphics g = paneel.getGraphics();

Ik heb die graphics nodig om te kunnen tekenen op mijn panel. Of moet ik dat
op een andere manier doen?


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.600 / Virus Database: 381 - Release Date: 28/02/2004
Technical Details
Message-ID: <N9o3c.28946$b%6.2058340@phobos.telenet-ops.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news2.telebyte.nl!newsrouter.london1.eu.level3.net!level3eu!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: 107324,a2bc5b1169c19c7,start
X-Google-Attributes: gid107324,public
X-Google-Thread: fcea4,a2bc5b1169c19c7,start
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2004-03-09 10:37:33 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news2.telebyte.nl!newsrouter.london1.eu.level3.net!level3eu!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
From: "Passero" <bla@bla.bla>
Newsgroups: be.comp.programming,nl.comp.programmeren
Subject: [java] getGraphics van JPanel
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <N9o3c.28946$b%6.2058340@phobos.telenet-ops.be>
Date: Tue, 09 Mar 2004 18:37:33 GMT
NNTP-Posting-Host: 213.118.243.172
X-Complaints-To: abuse@telenet.be
X-Trace: phobos.telenet-ops.be 1078857453 213.118.243.172 (Tue, 09 Mar 2004 19:37:33 MET)
NNTP-Posting-Date: Tue, 09 Mar 2004 19:37:33 MET
Organization: Telenet Internet