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.
JFrame フォームでは、jTextArea を追加し、そこにテキストを追加しましたが、まだデザイン モードです。しかし、フォームを実行すると、テキストを非表示にしたいのですが、それは起こっていません。JTextArea のプロパティを確認しましたが、テキストの可視性を変更する方法がよくわかりません..
フィールドをクリアするにJTextAreaは、そのテキストを空に設定する必要があります。 このためにはJTextArea#setText、 asnullまたはを参照する必要があり""ます。アプリケーションの実行時にこのコードを試してください。 jTerxtAreaObject.setText("");
JTextArea
JTextArea#setText
null
""
jTerxtAreaObject.setText("");
テキストの色を背景と同じ色に設定します。