ava swing:擷取jframe上的所有控件
擷取jframe上的所有控件:
代碼:
for(component co:ui.getrootpane().getcontentpane().getcomponents()) {
systen.out.println(co.getclass().tostring()); //得到co的類型
}
ava swing:擷取jframe上的所有控件
擷取jframe上的所有控件:
代碼:
for(component co:ui.getrootpane().getcontentpane().getcomponents()) {
systen.out.println(co.getclass().tostring()); //得到co的類型
}