Null Layout in NetBeans-JAVA -


i tried add image login frame in netbeans, try change layout 'free design' 'null layout' (like see in video: http://www.youtube.com/watch?v=uzfgiqm0uda), , it's work.

but when run program window open in left side, , not in regular size - can see in picture: enter image description here

what problem?

welcome wonderful world of why should not use null layouts (and why learning code ui form designer bad idea).

the problem facing based on fact swing (and awt) designed work layout managers, @ core of how framework works.

when call pack on window, asks it's children size , calculates best size window.

in case, because you're not using layout manager, window assuming it's default side of 0x0 (plus frame border).

to fix issue suggest 2 things. firstly, stop using form designer until understand how ui constructed , secondly, make use of 1 or more layout managers.

take @ a visual guide layout managers , using layout managers

i've not had chance use it, might worth while take @ miglayout, comes highly recommended many of users on so


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -