本文整理了Java中java.awt.Panel.getComponentCount()
方法的一些代码示例,展示了Panel.getComponentCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Panel.getComponentCount()
方法的具体详情如下:
包路径:java.awt.Panel
类名称:Panel
方法名:getComponentCount
暂无
代码示例来源:origin: sc.fiji/3D_Viewer
/**
* Removes the specified PointListPanel and hides the window, if it was the
* last one.
*
* @param plp
*/
public void removePointList(final PointListPanel plp) {
if (containsPointList(plp)) {
panel.remove(plp);
c.gridx--;
// hide if it is empty
if (panel.getComponentCount() == 0) setVisible(false);
}
}
代码示例来源:origin: google/sagetv
if (embeddedBounds == null || embeddedPanel.getComponentCount() == 0 || embeddedBounds.width == 0 || embeddedBounds.height == 0)
embeddedPanel.setBounds(0, 0, 0, 0);
else
代码示例来源:origin: org.jacorb/jacorb
/**
* Comment
*/
private void _actionWindowResized(java.awt.event.ComponentEvent componentEvent) {
int width = getBounds().width;
int diff = (width-12) - curr_width_wp;
if (width > init_width) {
curr_width_wp = curr_width_wp + diff;
} else {
curr_width_wp = init_width_wp;
}
getWorkPanel().setSize(curr_width_wp, getWorkPanel().getComponentCount()*14);
/*
if (width > init_width || curr_width > init_width) {
java.awt.Component[] components = getWorkPanel().getComponents();
System.out.println("Have got all components");
for (int i=0; i<components.length; i++) {
((DoubleListItem) components[i])._correctWidth(diff);
}
}
*/
getScrollPane().validate();
}
public void _addItem(DoubleListItem item) {
内容来源于网络,如有侵权,请联系作者删除!