For those of you who haven’t worked with C# WPF, let me give you a brief overview of the WPF layout. UI Elements in WPF are positioned using three main properties:
You specify horizontal and vertical alignments which can be set (individually, of course) to left, right, center, or stretch (which fills up the parent element either horizontally and/or vertically). An absolute width and height and a margin, which is the distance of the element from the left, top, right, and bottom edges of the screen, can be specified too.
What is the Java Swing layout equivalent of this?
Edit: How come all the "latecomers" to this question view it so negatively? I'm just trying to find an equivalent layout for this, not talk about how I should be arranging/positioning elements.
Edit 2: You know what, just pretend this question never existed -- my question has been solved and therefore I will be ignoring this thread.
CodePudding user response:
You should start by having a look at Laying Out Components Within a Container, which should provide you with enough information to solve the question yourself. I'd personally look towards GridBagLayout, but that's me.
You're unlikely to find an "exact" match, but you could also consider having a look at MigLayout