@Override public void streamOpen() { if (isStreamOpen) { L.og("INTERNAL L ERROR: trying to re-open alreadyopen stream "); return; } logFrame = new JFrame("Logging Window"); logArea = new JTextArea(); logArea.setEditable(false); logFrame.setSize(width, height); logFrame.setResizable(false); logFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); JScrollPane logAreaScroller = new JScrollPane(logArea); logAreaScroller.setSize(logFrame.getSize()); logAreaScroller.setPreferredSize( new Dimension((logFrame.getWidth() * 3) / 4, (logFrame.getHeight() * 3) / 4)); logPanel.add(logAreaScroller); logFrame.getContentPane().add(logPanel); logFrame.setVisible(true); isStreamOpen = true; }
public LGuiStream(int width, int height) { if (GraphicsEnvironment.isHeadless()) { L.og("INTERNAL L ERROR: creating new LGuiStream on headless system "); } this.width = width; this.height = height; }