由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Help: 小程序挑错
相关主题
Re: 关于APPLET的IO问题请教BufferedImage中的setColor问题。
这道题该走什么路求教jbuilder的问题
Re: print problem, GUI guru please come in可以帮我看看这HelloWordApplet哪错了吗?
关于new operator的问题为啥画不出来?
●●●●紧急求助JAVA初级问题,今天project due●●●●丢骰子的程序,大牛们帮忙看看吧
what's wrong with this simple applet? (转载)新手求教JTextField的问题
新手请教 java applet+html 入门级问题a JTable question
想听本版对下面这段话的点评Re: How to write to a file on server in an applet?
相关话题的讨论汇总
话题: import话题: label话题: applet话题: 程序
进入Java版参与讨论
1 (共1页)
a***a
发帖数: 974
1
不好意思, 又是高中生的题目, 不过我请了两个写程序的高手, 都没找到第二个错!
Here is the code for a simple applet. It doesn't compile, due to two big,
glaring errors in the code. Find the error and explain why it's a mistake.
Then say how you would change the code to fix the error.
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Color;
import java.awt.Label;
public class ExamApplet1 extends Applet {
Graphics g;
boolean ready=false;
Label questionLabel = new Label("What is this thing?");
questionLabel.setSize(2
n******r
发帖数: 294
2
too low-land de le ba
put questionLabel.setSize(25,40);
inside
public void init()
{}

【在 a***a 的大作中提到】
: 不好意思, 又是高中生的题目, 不过我请了两个写程序的高手, 都没找到第二个错!
: Here is the code for a simple applet. It doesn't compile, due to two big,
: glaring errors in the code. Find the error and explain why it's a mistake.
: Then say how you would change the code to fix the error.
: import java.applet.Applet;
: import java.awt.Graphics;
: import java.awt.Color;
: import java.awt.Label;
: public class ExamApplet1 extends Applet {
: Graphics g;

S*********g
发帖数: 5298
3
Exaclty.
My solutions is to put it in
public ExamApplet1()
{
questionLabel.setSize(25,40);
}

【在 n******r 的大作中提到】
: too low-land de le ba
: put questionLabel.setSize(25,40);
: inside
: public void init()
: {}

a***a
发帖数: 974
4
谨向NoWonder, SuperString 致敬!

!
big,
mistake.

【在 S*********g 的大作中提到】
: Exaclty.
: My solutions is to put it in
: public ExamApplet1()
: {
: questionLabel.setSize(25,40);
: }

z****g
发帖数: 2497
5
find in 1 mins.
setBackground(Color.black)
if(ready = true)

【在 a***a 的大作中提到】
: 不好意思, 又是高中生的题目, 不过我请了两个写程序的高手, 都没找到第二个错!
: Here is the code for a simple applet. It doesn't compile, due to two big,
: glaring errors in the code. Find the error and explain why it's a mistake.
: Then say how you would change the code to fix the error.
: import java.applet.Applet;
: import java.awt.Graphics;
: import java.awt.Color;
: import java.awt.Label;
: public class ExamApplet1 extends Applet {
: Graphics g;

h****e
发帖数: 2125
6
O faint! Tutorial example??

【在 a***a 的大作中提到】
: 不好意思, 又是高中生的题目, 不过我请了两个写程序的高手, 都没找到第二个错!
: Here is the code for a simple applet. It doesn't compile, due to two big,
: glaring errors in the code. Find the error and explain why it's a mistake.
: Then say how you would change the code to fix the error.
: import java.applet.Applet;
: import java.awt.Graphics;
: import java.awt.Color;
: import java.awt.Label;
: public class ExamApplet1 extends Applet {
: Graphics g;

1 (共1页)
进入Java版参与讨论
相关主题
Re: How to write to a file on server in an applet?●●●●紧急求助JAVA初级问题,今天project due●●●●
a question regarding appletwhat's wrong with this simple applet? (转载)
赶快帮帮我!新手请教 java applet+html 入门级问题
再问个java的蠢问题,别骂我想听本版对下面这段话的点评
Re: 关于APPLET的IO问题请教BufferedImage中的setColor问题。
这道题该走什么路求教jbuilder的问题
Re: print problem, GUI guru please come in可以帮我看看这HelloWordApplet哪错了吗?
关于new operator的问题为啥画不出来?
相关话题的讨论汇总
话题: import话题: label话题: applet话题: 程序