List of usage examples for javax.swing JFrame setFocusableWindowState
public void setFocusableWindowState(boolean focusableWindowState)
From source file:Main.java
public static void main(String[] argv) throws Exception { JFrame frame = new JFrame(); frame.setFocusableWindowState(false); }
From source file:ConsoleWindowTest.java
public static void init() { JFrame frame = new JFrame(); frame.setTitle("ConsoleWindow"); final JTextArea output = new JTextArea(); output.setEditable(false);/*from w ww . ja v a 2 s . co m*/ frame.add(new JScrollPane(output)); frame.setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); frame.setLocation(DEFAULT_LEFT, DEFAULT_TOP); frame.setFocusableWindowState(false); frame.setVisible(true); // define a PrintStream that sends its bytes to the output text area PrintStream consoleStream = new PrintStream(new OutputStream() { public void write(int b) { } // never called public void write(byte[] b, int off, int len) { output.append(new String(b, off, len)); } }); // set both System.out and System.err to that stream System.setOut(consoleStream); System.setErr(consoleStream); }