Component.java 文件源码

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

项目:openjdk-jdk10 作者:
/**
 * Gets the foreground color of this component.
 * @return this component's foreground color; if this component does
 * not have a foreground color, the foreground color of its parent
 * is returned
 * @see #setForeground
 * @since 1.0
 */
@Transient
public Color getForeground() {
    Color foreground = this.foreground;
    if (foreground != null) {
        return foreground;
    }
    Container parent = this.parent;
    return (parent != null) ? parent.getForeground() : null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号