SyntaxFix
Write A Post
Hire A Developer
Questions
Try to play with
setMinSize() setMaxSize() setPreferredSize()
These method are used by layout when it decide what should be the size of current element. The layout manager calls setSize() and actually overrides your values.