java – Single button multiple intents?-ThrowExceptions

Exception or error:

I have a button. If I want the button to handle multiple intents, for example, clicking it first time drops a new window, and clicking it the second time drops another.
Can we use switch cases here? Any help would be appreciated.

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *