I tried to use one, but I can't figure out how to set one up.
Do you add it to a separate JFrame?
I'm gonna try this(though where do I put it in the Window Listener? I'm thinking windowOpened()).
public JPasswordFrame extends JFrame() { private JPasswordField field; private JLabel label; private JButton ok; public JPasswordFrame() { setTitle("Enter password"); label = new JLabel("Enter password here."); field = new JPasswordField(); ok = new JButton("Ok"); } public String getPasswordText() { return field.getText(); } }
Now what?
I'd like it to work inside a JFrame and have JPasswordFrame come up and not go away or let the user into the JFrame until they get it right.


LinkBack URL
About LinkBacks




Reply With Quote
by clicking the
button on their useful posts.