java.awt.Container.setForeground()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(196)

本文整理了Java中java.awt.Container.setForeground()方法的一些代码示例,展示了Container.setForeground()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Container.setForeground()方法的具体详情如下:
包路径:java.awt.Container
类名称:Container
方法名:setForeground

Container.setForeground介绍

暂无

代码示例

代码示例来源:origin: leMaik/swing-material

/**
 * Chainable method to quickly get a {@link MaterialWindow} with a white
 * background and black foreground. You can append it to your constructor
 * like this: {@code MaterialWindow myWindow = new MaterialWindow.dark()} or
 * just use it alone to switch the foreground/background colors.
 * @return this window
 */
public MaterialWindow light() {
  getContentPane().setBackground(MaterialColor.GREY_50);
  getContentPane().setForeground(MaterialColor.GREY_800);
  return this;
}

代码示例来源:origin: leMaik/swing-material

/**
 * Chainable method to quickly get a {@link MaterialWindow} with a dark
 * background and white foreground. You can append it to your constructor
 * like this: {@code MaterialWindow myWindow = new MaterialWindow.dark()} or
 * just use it alone to switch the foreground/background colors.
 * @return this window
 */
public MaterialWindow dark() {
  getContentPane().setBackground(MaterialColor.GREY_850);
  getContentPane().setForeground(MaterialColor.WHITE);
  return this;
}

代码示例来源:origin: edu.ucar/jj2000

/**
 * Sets the foreground color of this component. It sets the foreground of
 * the 3 areas (image display and scrollbars) plus this contaioner's
 * foreground.
 *
 * @param c The color to become this component's foreground color.
 * */
public synchronized void setForeground(Color c) {
  super.setForeground(c);
  imgDisplay.setForeground(c);
  hsbar.setForeground(c);
  vsbar.setForeground(c);
}

代码示例来源:origin: edu.ucar/grib

/**
 * Sets the foreground color of this component. It sets the foreground of
 * the 3 areas (image display and scrollbars) plus this contaioner's
 * foreground.
 *
 * @param c The color to become this component's foreground color.
 * */
public synchronized void setForeground(Color c) {
  super.setForeground(c);
  imgDisplay.setForeground(c);
  hsbar.setForeground(c);
  vsbar.setForeground(c);
}

代码示例来源:origin: com.tourgeek.thin.app/com.tourgeek.thin.app.booking

parent.setForeground(Color.black);

代码示例来源:origin: edu.illinois.lis/indri

myFrame.setForeground(navyBlue);
myFrame.setBackground(lightYellow);
myFrame.getContentPane().setForeground(navyBlue);
myFrame.getContentPane().setBackground(lightYellow);

相关文章

微信公众号

最新文章

更多

Container类方法