本文整理了Java中javax.swing.JFrame.getBackground()
方法的一些代码示例,展示了JFrame.getBackground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFrame.getBackground()
方法的具体详情如下:
包路径:javax.swing.JFrame
类名称:JFrame
方法名:getBackground
暂无
代码示例来源:origin: stackoverflow.com
JFrame frame = new JFrame();
frame.setLayout(new FlowLayout());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(300,300);
JTextField textField = new JTextField("some text");
textField.setBorder(BorderFactory.createEmptyBorder());
textField.setBackground(frame.getBackground());
frame.getContentPane().add(textField);
frame.setVisible(true);
代码示例来源:origin: stackoverflow.com
if (m.matches())
errorMsg.setForeground(frame.getBackground());
代码示例来源:origin: com.darwinsys/darwinsys-api
resultsStatusBar = new SuccessFailureBarSwing(mainWindow.getBackground(), 400, 20);
resultsStatusBar.reset();
mainWindow.add((JComponent)resultsStatusBar, BorderLayout.SOUTH);
代码示例来源:origin: violetumleditor/violetumleditor
@Override
protected void configure()
{
this.defaultGridColor = new Color(250, 250, 250);
JMenuBar menuBar = new JMenuBar();
this.basicMenubarBackground = menuBar.getBackground();
this.basicMenubarForeground = menuBar.getForeground();
this.basicMenubarFont = menuBar.getFont();
JMenu menu = new JMenu();
this.basicMenuBackground = menu.getBackground();
this.basicMenuForeground = menu.getForeground();
this.basicMenuFont = menu.getFont();
JTextField textArea = new JTextField();
this.basicWhite = textArea.getBackground();
this.basicBlack = textArea.getForeground();
JFrame frame = new JFrame();
this.basicFrameBackground = frame.getBackground();
frame.dispose();
JProgressBar progressBar = new JProgressBar();
this.basicProgressbarForeground = progressBar.getForeground();
JTabbedPane pane = new JTabbedPane();
this.basicTabbedPaneBackground = pane.getBackground();
}
代码示例来源:origin: IanDarwin/darwinsys-api
resultsStatusBar = new SuccessFailureBarSwing(mainWindow.getBackground(), 400, 20);
resultsStatusBar.reset();
mainWindow.add((JComponent)resultsStatusBar, BorderLayout.SOUTH);
代码示例来源:origin: mguessan/davmail
errorArea = new JTextPane();
errorArea.setEditable(false);
errorArea.setBackground(mainFrame.getBackground());
errorLabel = new JLabel();
errorPanel.add(errorLabel);
messageArea.setText(BundleMessage.format("LOG_STARTING_DAVMAIL"));
messageArea.setEditable(false);
messageArea.setBackground(mainFrame.getBackground());
messagePanel.add(messageArea);
内容来源于网络,如有侵权,请联系作者删除!