You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
have access to post topics
communicate privately with other members (PM)
not see advertisements between posts
have the possibility to earn one of our surprises if you are an active member
access many other special features that will be introduced later.
Hi, I'm making a small system. I need to created a username and password box to allow a user to view a tab. I'm fairly new to java and I'm not sure how i would do it.
You can find out about password fields here: How to Use Password Fields. You can add an ActionListener to the JTabbedPane and, if the user selected the tab you want to protect, launch the password dialog(for this you could use a JOptionPane) and decide about opening the tab depending on user response.