I know I am super late to stating if I figured it out or not, but I managed to do it myself without a 3rd party API. It isn't super efficient as if the string length gets too long, the last word is cut off. (You can look at the code if you wish, but I can no longer explain how it works as I have not looked at it in a long time.
public class ConsoleLog {
private static Color c = Color.WHITE;
public static Color getC() {
return c;
}
public static void setC(Color c) {
ConsoleLog.c = c;
}
private static int pos;
private static List<String[]> logs;
private static List<Point>linesPos = new ArrayList<Point>();
private static Rectangle r = Main.Main.screenSize;
public static void log(List <String[]> logs, Graphics g) {
g.setColor(c);
ConsoleLog.logs = logs;
splitConsole(g);
}
public static void splitConsole(Graphics g){
pos = 0;
for(int i = 0; i < (r.height / 2) / 10 - 10; i++) {
linesPos.add(new Point(10, (i * (r.height / (50 + 3) + 5) + 15)));
}
for(int i = 0; i < logs.size(); i++) {
for(int ie = 0; ie < logs.get(i).length || pos < logs.get(i).length; ie++) {
g.drawString(logs.get(i)[ie], linesPos.get(pos).x, linesPos.get(pos).y);
pos++;
}
}
}
To be clear, I was developing a small game engine and decided to scrap it as it was getting too messy, inefficient, and was built around a clicker game. I am working on a second one that will be able to create any 2D game the user wants and it is very user friendly. It is almost ready for its first version and I am excited to see what can be made out of it!