hi all, I wanted to build a small and easy interface where I have some text and two buttons, one to increase the size of the text and one to decrease it. I haven't built anything as yet, I am still thinking what's the best way to go.
In terms of where the text sits, I thought that perhaps a normal JTextField is probably not a good idea because it will have to grow/shrink with the text and I am not sure that a JTextField has the ability to do that. SHould I use a text area instead? Or what do you guys suggest?
Violet_82
89
Posting Whiz in Training
Recommended Answers
Jump to PostJTextField will fit to the text in it when you pack() its container (more precisely: it updates its preferred size to fit the text, and the layout manager uses that).
Jump to Postyes, if you wnat your component sizes/posiitons to be updated
All 6 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Violet_82
89
Posting Whiz in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Violet_82
89
Posting Whiz in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Violet_82
89
Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.