Article View: cn.bbs.comp.lang.java
Article #19429Re: java��ͼ����
From: ����
Date: Tue, 06 Jan 2004 10:41
Date: Tue, 06 Jan 2004 10:41
22 lines
1755 bytes
1755 bytes
Ӧ����g��null object�ɣ�
Graphics��һ��interface������һ��class��
����Կ����ڻص�����pain����paintComponent�������drawing������
�� �� waitting. �Ĵ������ᵽ: ��
: �տ�ʼ����������ȥ��
: �������£�
: private void jbInit() throws Exception {
: contentPane = (JPanel) this.getContentPane();
: contentPane.setLayout(borderLayout1);
: Graphics g = getGraphics();
: g.drawString("haha",4,4);
: this.setSize(new Dimension(400, 300));
: this.setTitle("Matrix3D");
: }
: ���ڴ����ڻ��㶫����д����
: ���ǵ���g.drawString��һ�оͳ�һ��NullPointerException
: ����ô�����أ�
--
�뿪�����֪������ã�����˰����֪���Ժ����Ķ�һ�Ρ�
[0;1;37m�� ��Դ:���ɽ��ˮ bbs.neu.edu.cn��[FROM: 210.83.210.174][m
Technical Details
Message-ID:
<4A9d9c$Caz@bbs.neu.edu.cn>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.neu.edu.cn!NEUShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: f6cb0,33ad995b7043c785 X-Google-Attributes: gidf6cb0,public X-Google-ArrivalTime: 2004-01-06 02:42:08 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.neu.edu.cn!NEU From: stillicel.bbs@bbs.neu.edu.cn (����) Newsgroups: cn.bbs.comp.lang.java Subject: Re: java��ͼ���� Date: 06 Jan 2004 10:41:26 GMT Organization: ��ɽ��ˮ Message-ID: <4A9d9c$Caz@bbs.neu.edu.cn> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Filename: java/M.1073385686.A Lines: 22