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.
GUI の修正版を Glasspane に描画しようとしています。私の考えは、ペイント機能をオーバーライドするパネルを用意することですが、次のようなことを試すと
glass = frame.getGlasspane(); glass.draw(g);
frame.setGlasspane(new JPanel()); でグラスペインを初期化したにもかかわらず、Nullpointer Exception が発生します。
ご協力いただきありがとうございます
ルートペインの使用方法の例、ペイント(グラフィックス g)の例、またはこちらをお読みください。