本文整理了Java中javax.swing.JFrame.setForeground()
方法的一些代码示例,展示了JFrame.setForeground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFrame.setForeground()
方法的具体详情如下:
包路径:javax.swing.JFrame
类名称:JFrame
方法名:setForeground
暂无
代码示例来源:origin: IanDarwin/javasrc
/** Main: make a Frame, add a FileTree */
public static void main(String[] av) {
JFrame frame = new JFrame("FileTree");
frame.setForeground(Color.black);
frame.setBackground(Color.lightGray);
Container cp = frame.getContentPane();
if (av.length == 0) {
cp.add(new FileTree(new File(".")));
} else {
cp.setLayout(new BoxLayout(cp, BoxLayout.X_AXIS));
for (int i=0; i<av.length; i++)
cp.add(new FileTree(new File(av[i])));
}
frame.pack();
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
代码示例来源:origin: stackoverflow.com
frame.setSize(1000, 500);
frame.setVisible(true);
frame.setForeground(Color.black);
timer.setFont(new Font("Calibri", Font.BOLD, 100));
timer.setForeground(Color.WHITE);
代码示例来源:origin: dhale/jtk
/**
* Sets the foreground color in all components in this frame.
* @param color the foreground color.
*/
public void setForeground(Color color) {
super.setForeground(color);
if (_panelMain==null) return;
_panelMain.setForeground(color);
_panelTL.setForeground(color);
if (_panelBR!=_panelTL)
_panelBR.setForeground(color);
}
代码示例来源:origin: stackoverflow.com
frame.setForeground(Color.black);
frame.setBackground(Color.lightGray);
Container cp = frame.getContentPane();
代码示例来源:origin: MegaMek/megamek
frame.setJMenuBar(menuBar);
frame.setBackground(SystemColor.menu);
frame.setForeground(SystemColor.menuText);
if (GUIPreferences.getInstance().getWindowSizeHeight() != 0) {
frame.setLocation(GUIPreferences.getInstance().getWindowPosX(),
代码示例来源:origin: edu.illinois.lis/indri
sim.setOpaque(true); //content panes must be opaque
myFrame.getContentPane().add(sim, BorderLayout.CENTER);
myFrame.setForeground(navyBlue);
myFrame.setBackground(lightYellow);
myFrame.getContentPane().setForeground(navyBlue);
代码示例来源:origin: MegaMek/megamek
frame.setForeground(SystemColor.menuText);
List<Image> iconList = new ArrayList<Image>();
iconList.add(frame.getToolkit().getImage(
代码示例来源:origin: MegaMek/megamek
frame.setForeground(SystemColor.menuText);
List<Image> iconList = new ArrayList<Image>();
iconList.add(frame.getToolkit().getImage(
代码示例来源:origin: MegaMek/megamek
frame.getContentPane().removeAll();
frame.setBackground(SystemColor.menu);
frame.setForeground(SystemColor.menuText);
frame.setResizable(false);
内容来源于网络,如有侵权,请联系作者删除!