I have a jpanel with gridbaglayout layout, in it i have several jtextfields, several jlabels, several jbuttons which get added dynamically. Therefore I cannot know their specific orders, hence cannot use panel.getComponent(count). I looked in the api if there is something like getGridx(int x) or getGridy(int y). Didn't find. Is there anything similar to those methods?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
The simplest solution might be to use
GridBagLayout#getConstraints(Component)
and simply loop through all the components until you find one that matches the required grid position...