package nars.gui;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JSplitPane;
import javax.swing.SwingUtilities;
import nars.gui.input.TextInputPanel;
import nars.gui.output.LogPanel;
import nars.gui.output.SwingLogPanel;

/**
 * Combines input panel with a log output panel, divided by a splitpane
 */
public class ConsolePanel extends JSplitPane {
    
    public ConsolePanel(NARControls narControls) {
        super(JSplitPane.VERTICAL_SPLIT);
        
        LogPanel outputLog = new SwingLogPanel(narControls);
        add(outputLog, 0);
        
        TextInputPanel inputPanel = new TextInputPanel(narControls.nar);
        add(inputPanel, 1);
        
        SwingUtilities.invokeLater(new Runnable() {

            @Override
            public void run() {
                try {
                    Thread.sleep(50);
                } catch (InterruptedException ex) {
                    Logger.getLogger(ConsolePanel.class.getName()).log(Level.SEVERE, null, ex);
                }
                setDividerLocation(0.75);
            }
            
        });
        
        setDividerLocation(0.75);
        
    }
    
}

@@ -12,16 +12,42 @@
 s.gui;%0A%0A
+import java.awt.Graphics;%0A
 import j
@@ -711,24 +711,26 @@
 el, 1);%0A    
+%7D%0A
     %0A       
@@ -730,69 +730,35 @@
     
-    SwingUtilities.invokeLater(new Runnable() %7B%0A%0A       
+boolean painted=false;%0A
     
- 
 @Ove
@@ -763,24 +763,16 @@
 verride%0A
-        
     publ
@@ -783,124 +783,24 @@
 oid 
-run() %7B%0A                try %7B%0A                    Thread.sleep(50);%0A                %7D catch (InterruptedException ex
+paint(Graphics g
 ) %7B%0A
@@ -811,193 +811,75 @@
     
- 
-           Logger.getLogger(ConsolePanel.class.getName()).log(Level.SEVERE, null, ex);%0A                %7D%0A                setDividerLocation(0.75);%0A            %7D%0A            %0A        %7D)
+super.paint(g);%0A%0A        if (!painted) %7B%0A            painted = true
 ;%0A  
@@ -884,25 +884,25 @@
         
-%0A
     
-    
+this.
 setDivid
@@ -927,22 +927,18 @@
         
-%0A    
 %7D%0A    
+%7D
 %0A%7D%0A

resolve minor main GUI issue (seperator)