クリックすると、作成したツールを開く入力ボタンを持つ GUI を持つコーディングをいくつか書きましたが、jbutton で実行したいのは、最初の GUI を閉じてツールを開くことです。ステートメントを変更しようとしましたsetVisible(true/false);
が、GUI を非表示にするだけで実行されません。
要約するとJButton
、現在の GUI を閉じる機能と、作成したツールを開く機能の 2 つの機能が必要です。
enterButton
GUIを閉じるには、このコーディングと関係があると思います:
public void actionPerformed(ActionEvent e){
if(e.getSource() == enterButton){
// coding to make the GUI exit???
}
}