私はこれを理解することはできません:
> Given g, a reference to a Graphics object, use a constant defined in > the Color class to write a statement that arranges for the next drawn > rectangle to be red:
誰かアイデア?Myprogramminglab用です
私は考えました:
g.setColor(Color.red);
g.drawRect (10, 10, 200, 200);
またはそのようなものですが、機能しません。私が想像できるすべてを試しました。
ありがとう
編集
Myprogramminglabに関する最後の質問は次のとおりです。
> Write the invocation (method name with arguments) needed to display > the outline of a square whose sides are 60 pixels and whose top right > corner is located at (100,200).
答えは:
drawRect(40,200,60,60)
ですから、私が何をする必要があるかについての情報は多かれ少なかれ得られず、答えはスクリプト全体を構築するようなものではありません。だから私は本当に手がかりがありません。『Java Solutions』という本には、私が今抱えている問題についての情報もありません。