Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an eye to the JPasswordField in order to toggle masking character #173

Closed
Blanco27 opened this issue Sep 8, 2020 · 3 comments · Fixed by #442
Closed

Add an eye to the JPasswordField in order to toggle masking character #173

Blanco27 opened this issue Sep 8, 2020 · 3 comments · Fixed by #442
Milestone

Comments

@Blanco27
Copy link
Contributor

Blanco27 commented Sep 8, 2020

I assume this would be a nice addition to the GUI, as many inexperienced users would appreciate this feature. Especially people that rarely ever use a keyboard. The same problematics described in #172 should probably be taken into consideration here as well.
I assume that if this added, it should be toggleable via the UIManager and disabled by default.

Here's what it could look like (This is our messy and hacky non-look-and-feel way of doing it):

iQXeU7HEGV

@DevCharly
Copy link
Collaborator

Nice idea 👍

I'll add this later.
But first I need to extend FlatTextFieldUI so that it is possible to add icons/components to left and right sides of text field...

@Bios-Marcel
Copy link
Contributor

Hey, do you already have some kind of API in mind and is it supposed to be something internal or something external?
I am assuming internal though, as adding public API to the UI class is probably not something you desire and this doesn't sound like something that makes sense via JComponent#putClientProperty.

I'd like to try working on this and fix #172 as well.

DevCharly added a commit that referenced this issue Jul 5, 2021
…tFieldUI` (instead of `BasicPasswordFieldUI`) to avoid duplicate code and for easier extensibility (e.g. for #173 and #341)
DevCharly added a commit that referenced this issue Jul 5, 2021
@DevCharly
Copy link
Collaborator

finally implemented in PR #442 😄

@DevCharly DevCharly added this to the 2.0 milestone Dec 15, 2021
DevCharly added a commit that referenced this issue Dec 30, 2021
…setEchoChar() was invoked from application (PR #442; issue #173)
DevCharly added a commit that referenced this issue Jan 6, 2022
PasswordField: reveals button has now component name `PasswordField.revealButton` and additional style class `revealButton` (issue #173)
SwingUtils: added `getComponentByName()` for easy getting clear or reveal buttons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants