我想写入控制台并在表单上绘图,我尝试使用
Console cnsl = null;
PrintWriter out = null;
// creates a console object
cnsl = System.console();
// if console is not null
if (cnsl != null) {
// creates new print writer
out = cnsl.writer();
// prints
out.println("Here is The Optimus Prime!!");
}
但它没有打开控制台窗口,只打开了窗体窗口!