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

TextField corners #65

Closed
Poivin opened this issue Feb 16, 2020 · 3 comments
Closed

TextField corners #65

Poivin opened this issue Feb 16, 2020 · 3 comments

Comments

@Poivin
Copy link

Poivin commented Feb 16, 2020

Hi,

it seems that components like comboBox or buttons can have rounded corners (Component.arc) but it is not available for textFields or textComponents like TextArea. Am i wrong?
To my mind, it could enhance the consistency between all UI components. Would it be suitable to have the "arc" custom property at textComponent level?
Capture

@Poivin Poivin changed the title TextField borders TextField corners Feb 16, 2020
@DevCharly
Copy link
Collaborator

@Poivin thanks for the idea. It is implemented in commit b522500 for JTextField, JFormattedTextField and JPasswordField.

For JTextArea, JTextPane and JEditorPane it is difficult to implement because the border is painted by the JScrollPane and round edges at the JScrollPane would be painted over by the rectangular scroll view...

To enable it use:

UIManager.put( "TextComponent.arc", 5 );

Or use the same value as for combo boxes:

UIManager.put( "TextComponent.arc", UIManager.getInt( "Component.arc" ) );

You can use the latest snapshot to try it out:
https://github.com/JFormDesigner/FlatLaf#snapshots

@Poivin
Copy link
Author

Poivin commented Feb 17, 2020

Thanks a lot @DevCharly !

@DevCharly
Copy link
Collaborator

released in 0.28

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

No branches or pull requests

2 participants