You can setPreferredSize() and some layout managers will honor it, but it's not guaranteed. It depends on the layout manager how component sizing is handled. You would need to be more specific about the placement and sizing behavior you are wanting to give a more direct answer.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 838
Posting Genius
Offline 6,756 posts
since May 2007