Question

How do you change the width and height of a JTextField and a JPasswordField? I Googled it, but I can't find anything. Thanks for your time!

Was it helpful?

Solution

To adjust the height, set a different font size.

To adjust the width, specify the number of columns during construction. Setting a different font size will also affect the width.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top