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
Post a Comment