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的类型
}