Tushar Monirul
Tushar Monirul

Reputation: 5064

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

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.

Upvotes: 3

Views: 2987

Answers (2)

user1848537
user1848537

Reputation:

Use JButton.setVisible(false); right after you create the button.

Upvotes: 4

madth3
madth3

Reputation: 7344

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.

Upvotes: 5

Related Questions