java swing to count all controls

前端 未结 3 662
-上瘾入骨i
-上瘾入骨i 2021-01-27 10:59

How to count number of controls like JTextField, J Label and so on so..in java swing form designing,for example if we use only one textbox and one text field means i need the o

3条回答
  •  不思量自难忘°
    2021-01-27 11:21

    With SwingX, you have in class org.jdesktop.swingx.util.WindowUtils public static List getAllComponents(Container c). With that you have all components and subcomponents in container.

提交回复
热议问题