Is there a LayoutManager for Swing that acts as LinearLayout in Android? I like an idea of components weights very much.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
You can use the FlowLayout, GridLayout or BorderLayout. In my experience in building GUI in java, I mostly use combinations of BorderLayouts (most of the time) and GridLayouts.
Layout Basics
If you want it to look like
the code is:
If you need individual weights use GridBagLayout. Or you can try BoxLayout.