如何同时运行Console和Form

时间:2014-09-16 06:22:22

标签: java console

我想写入控制台并在表单上绘图,我尝试使用

  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!!");
         }

但它没有打开控制台窗口,只打开了窗体窗口!

0 个答案:

没有答案
相关问题