java - JFrame setsize with x by x input is not square -


i playing around jframe , when this:

public class ui extends jframe {     public ui() {         pack();         setsize(50, 50);         setlocationrelativeto(null);         setvisible(true);          }     public static void main(string[] args) {         ui test =new ui();     } } 

the frame not square, when change (50,50) larger (500,500) square. can tell why is?

setsize(50,50) small size jframe, jframe root component @ least use proper size it. contains title control box , because of it, square small size difficult. alternative can use jwindow small square size.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -