package nars.gui;

import nars.gui.input.TextInputPanel;
import nars.gui.output.LogPanel;
import nars.gui.output.SwingLogPanel;

import javax.swing.*;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * 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,129 @@
 s.gui;%0A%0A
+import java.awt.Graphics;%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;%0Aimport javax.swing.*;%0A
 import n
@@ -239,96 +239,8 @@
 l;%0A%0A
-import javax.swing.*;%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;%0A%0A
 /**%0A
@@ -667,24 +667,26 @@
 el, 1);%0A    
+%7D%0A
     %0A       
@@ -686,65 +686,19 @@
     
-    SwingUtilities.invokeLater(new Runnable() %7B%0A%0A        
+int cnt=0;%0A
     
@@ -707,24 +707,16 @@
 verride%0A
-        
     publ
@@ -727,89 +727,64 @@
 oid 
-run() %7B%0A                try %7B%0A                    Thread.sleep(50
+paint(Graphics g) %7B%0A        super.paint(g
 );%0A   
-  
+%0A
         
    %7D
@@ -783,160 +783,162 @@
     
-   %7D catch (InterruptedException ex) %7B%0A                    Logger.getLogger(ConsolePanel.class.getName()).log(Level.SEVERE, null, ex);%0A                %7D
+if(cnt%3C5) %7B //according to stack overflow, the paint method is the only way to do this correctly%0A            cnt++; //but it seems still not be guranteed 
 %0A   
@@ -942,28 +942,29 @@
             
-    
+this.
 setDividerLo
@@ -980,90 +980,73 @@
 75);
-%0A            %7D%0A            %0A        %7D);%0A        %0A        setDividerLocation(0.75);
+ //strangely on second paint it works, to make sure I put it to 5
 %0A   
@@ -1046,24 +1046,25 @@
 o 5%0A        
+%7D
 %0A    %7D%0A    %0A

Update ConsolePanel to 1.6.1 state (commit ed64c0e98fe04b8d163bb462fcefc22537d19fc7)