ComponentShowingButton.java 文件源码

java
阅读 32 收藏 0 点赞 0 评论 0

项目:defense-solutions-proofs-of-concept 作者:
/**
 * Sets the component to be shown.
 * @param component the component to be shown.
 * @param parent the container to which the shown component should be added.
 *               This parameter can be null if you add the component yourself.
 */
public void setComponent(Component component) {
    this.component = component;
    if (null != component) {
        component.addComponentListener(new ComponentAdapter() {

            @Override
            public void componentHidden(ComponentEvent e) {
                if (null != unselectButton && isSelected()) {
                    unselectButton.setSelected(true);
                }
            }

        });
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号