java - Netbeans Jlabel visibility when switching tabs -


i'm working on jframe program have 2 tabs (home & about) .. display jlabel in tab when button clicked , managed using jlabel5.setvisible(true); ... works fine , when go home tab , go again tab , jlabel gone have press again can appear ... there way can make stay there without resetting everytime switch tabs? ... gif showing problem http://imgur.com/leayqxl

perhaps share code, there might work around, try create "flag" variable going true or false, create variable flag change true once click in button , then, when pass tab check if flag true jlabel5.setvisible(true) else jlabel5.setvisible(false), remember initialize flag variable false.

hope work around works you


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -