List of usage examples for javax.swing JFrame setForeground
public void setForeground(Color c)
From source file:MainClass.java
public static void main(String[] av) { JFrame frame = new JFrame("MainClass"); frame.setForeground(Color.black); frame.setBackground(Color.lightGray); Container cp = frame.getContentPane(); cp.add(new MainClass(new File("."))); frame.pack();//from w ww . ja va 2 s. co m frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); }
From source file:FileTree.java
/** 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 {/*from w w w. j av a 2 s. c o m*/ 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); }
From source file:scheduler.benchmarker.manager.CreateCombinedSplineChart.java
private void createSubChart(ChartPanel chart) { JFrame frameGraph = new JFrame(); frameGraph.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frameGraph.setForeground(new Color(76, 76, 76)); frameGraph.setBackground(new Color(246, 244, 242)); Dimension window = Toolkit.getDefaultToolkit().getScreenSize(); if (window.width < 1074 && window.height < 800) frameGraph.setPreferredSize(new Dimension(window.width, window.height)); else//from w w w . j a v a2 s. co m frameGraph.setPreferredSize(new Dimension(1074, 800)); frameGraph.setLocation((window.width - frameGraph.getPreferredSize().width) / 2, (window.height - frameGraph.getPreferredSize().height) / 2); frameGraph.setResizable(true); frameGraph.add(chart); frameGraph.pack(); frameGraph.setVisible(true); }
From source file:scheduler.benchmarker.manager.CreateSimpleSplineChart.java
private void createSubChart(ChartPanel chart) { JFrame frameGraph = new JFrame();//new JFrame("FINAL RULES ARRANGEMENT"); frameGraph.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frameGraph.setForeground(new Color(76, 76, 76)); frameGraph.setBackground(new Color(246, 244, 242)); Dimension window = Toolkit.getDefaultToolkit().getScreenSize(); if (window.width < 1074 && window.height < 800) frameGraph.setPreferredSize(new Dimension(window.width, window.height)); else/*ww w. j a v a2s . co m*/ frameGraph.setPreferredSize(new Dimension(1074, 800)); frameGraph.setLocation((window.width - frameGraph.getPreferredSize().width) / 2, (window.height - frameGraph.getPreferredSize().height) / 2); frameGraph.setResizable(true); frameGraph.add(chart); frameGraph.pack(); frameGraph.setVisible(true); }