请问怎么获得系统的日期和时间,并输出到标题栏,查了好多资料都不理想,谢谢

解决方案 »

  1.   

    和java中的一样,然后setTitle()
      

  2.   


    import    java.text.SimpleDateFormat;     
         
    SimpleDateFormat    formatter    =   new    SimpleDateFormat    ("yyyy年MM月dd日    HH:mm:ss      ");     
    Date    curDate    =   new    Date(System.currentTimeMillis());//获取当前时间     
    String    str    =    formatter.format(curDate);