Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Graphics g を宣言し、コードに g.drawRect を入力するだけでは機能しません。別の選択肢があることを願っています。助けてくれる人に感謝します!
グラフィックス オブジェクトは、GUI コンポーネントから取得するか、BufferedImage のいずれかのビットにアタッチする必要があります。Graphics オブジェクトを割り当ててそこに描画するだけでは意味がありません。
ですから、あなたが何をしていたのか (または何をしたかったのか) を示すと、おそらく助けになるでしょう。