21.5. Anchoring and Docking
One of the key differences between the .NET GUI classes and Java AWT and Swing classes is the manner in which they lay out the controls inside a container object. In .NET the default positioning of the controls within the container is absolute. This means that you must specify hard numbers when deciding where exactly to put the control on the container. It also means that the control does not resize when the container is resized. In Java AWT and Swing, the positioning of the controls is relative to the container and is specified using the available layout managers. As a result, the controls resize with the container.
Without code for resizing the controls in .NET, the controls will overlap when the container is resized. ...
Get .NET for Java Developers: Migrating to C# now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.