Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a hidden "Exit" button in java netbeans?

Tags:

java

button

swing

I want to create a hidden button in netbeans. Suppose if I click a Next button then a new "Exit" button will be appear in the same jFrame. Until I click the Next button the Exit button will not be shown. So how to make it? I mean how to make a button which is by-default in .setVisible(false) in netbeans?

Please help me out about this problem.

like image 373
Tushar Monirul Avatar asked Dec 27 '22 14:12

Tushar Monirul


1 Answers

Since you already seem to know the proper method I assume you doubt is about Netbeans operation.

Right click in the method and select "Customize Code".

Then you'll have the chance to add the proper code after the button creation.

like image 144
madth3 Avatar answered Jan 05 '23 08:01

madth3