⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formatdemo.java

📁 its a kind of tutorial.
💻 JAVA
字号:
// Filename PropertyDemo.java.
// Program to load and display the system properties.
//
// Written for JI book, Chapter 9 see text.
// Fintan Culwin, v0.2, August 1997.


import java.applet.*;
import java.awt.*;
import java.util.*;

public class PropertyDemo  extends Applet { 

   public void init() {    

   Properties    preset   = System.getProperties();
   String        userName = new String( preset.getProperty( "user.name"));
   AppletContext itsContext;
   
      System.out.println( "hello " + userName);
      
     try { 
        itsContext = this.getAppletContext();
        System.out.println( "applet");
     } catch ( NullPointerException  exception) {    
        System.out.println( "stand alone");
     } // End try/ catch.
//      preset.list( System.out);      
   } // End init.
   
   
   public static void main( String args[]) { 

   Frame        frame        = new Frame("PostIt");
   PropertyDemo theDemo = new PropertyDemo();

      theDemo.init();
      frame.add(theDemo, "Center");
      frame.show();
      frame.setSize( frame.getPreferredSize());
   } // end main.
   
} // End PropertyDemo

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -