Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

window size  RSS feed

 
Roopa Bagur
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main window and most of the dialogs of my program are resizable. Is there any way to limit the minimum size since the windows start to get very ugly when reduced too far. I have tried setting the minimum and preferred sizes on all of the containers, but they seem to be ignored. Is this tied to the fact that they can be reduced to icon size and if the minimum were limited, then the icon would be that size as well?
I am using border layout manager
Thanks,
Roopa
 
Sanjiv Kumar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Roopa Bagur:
The main window and most of the dialogs of my program are resizable. Is there any way to limit the minimum size since the windows start to get very ugly when reduced too far. I have tried setting the minimum and preferred sizes on all of the containers, but they seem to be ignored. Is this tied to the fact that they can be reduced to icon size and if the minimum were limited, then the icon would be that size as well?
I am using border layout manager
Thanks,
Roopa

U should use Gridbaglayaout. Your component is resizable so gridbaglayout is very helpful to u.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just found a solution to this problem at the sun forums: http://forum.java.sun.com/thread.jsp?forum=57&thread=328852
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!