本文整理了Java中javax.swing.JComboBox.getComponentCount()
方法的一些代码示例,展示了JComboBox.getComponentCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComboBox.getComponentCount()
方法的具体详情如下:
包路径:javax.swing.JComboBox
类名称:JComboBox
方法名:getComponentCount
暂无
代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java15
/**
* A convenience method to search through the given JComboBox for the
* JButton which toggles the popup up open and closed.
*/
private static JButton findArrowButton(JComboBox c) {
for (int i = 0, n = c.getComponentCount(); i < n; i++) {
final Component comp = c.getComponent(i);
if (comp instanceof JButton)
return (JButton) comp;
}
return null;
}
代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java16
/**
* A convenience method to search through the given JComboBox for the
* JButton which toggles the popup up open and closed.
*/
private static JButton findArrowButton(JComboBox c) {
for (int i = 0, n = c.getComponentCount(); i < n; i++) {
final Component comp = c.getComponent(i);
if (comp instanceof JButton)
return (JButton) comp;
}
return null;
}
代码示例来源:origin: com.haulmont.thirdparty/glazedlists
/**
* A convenience method to search through the given JComboBox for the
* JButton which toggles the popup up open and closed.
*/
private static JButton findArrowButton(JComboBox c) {
for (int i = 0, n = c.getComponentCount(); i < n; i++) {
final Component comp = c.getComponent(i);
if (comp instanceof JButton)
return (JButton) comp;
}
return null;
}
代码示例来源:origin: net.anwiba.commons/anwiba-commons-swing-core
public static JButton getComboBoxButton(final JComboBox<?> comboBox) {
for (int i = 0; i < comboBox.getComponentCount(); i++) {
final Component comboBoxComponent = comboBox.getComponent(i);
if (comboBoxComponent == null) {
continue;
}
if (comboBoxComponent instanceof JButton) {
return (JButton) comboBoxComponent;
}
}
throw new UnreachableCodeReachedException();
}
内容来源于网络,如有侵权,请联系作者删除!