system information with GUI boxes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • keke3905
    New Member
    • Sep 2006
    • 1

    #1

    system information with GUI boxes

    I really would appreciate some help on this assignment. I need to make GUI boxes to display the system info such as on Microsoft Office. I have some code but not sure where to go with the rest of it. Help please. I will also include instructions that I was given.. I am working in JGrasp environment with Java.

    In order to tuning programs to meet the hardware requirements and provide optimal performance, it is very important to retrieve system information for every program. In this assignment, you need to print out system information including:
    a. Display mode
    Width
    Height
    Bit depth
    Refresh rate
    b. OS information
    Name
    Version
    Architecture
    c. User information
    Name
    Country
    Language
    Home directory
    Working directory
    d. Java information
    Java version
    Installation path
    Class path
    Vendor
    Vendor URL
    e. Java Virtual Machine information
    Total VM memory
    Max VM memory
    Free VM memory
    f. CPU information
    processor
    vendor_id
    model name
    cpu MHZ
    cache size
    g. Physical memory information
    MemTotal
    MemFree
    Buffers
    Cached

    To implement (a), you need to write codes like:

    //The following codes are used to get display mode
    GraphicsEnviron ment ge = GraphicsEnviron ment.getLocalGr aphicsEnvironme nt();
    GraphicsDevice[] gs = ge.getScreenDev ices();
    for (int j = 0; j < 1 /* gs.length */; j++) { //Only one display
    DisplayMode dm = gs[j].getDisplayMode ();
    int width = dm.getWidth();
    int height = dm.getHeight();
    int bitdepth = dm.getBitDepth( );
    int refreshrate = dm.getRefreshRa te();
    }

    To implement (b) to (e), you need to write codes like:

    //The following codes are used to get OS information
    System.out.prin tln("Current OS Information");
    System.out.prin tln("Name " + System.getPrope rty("os.name")) ;
    System.out.prin tln("Version " + System.getPrope rty("os.version "));
    System.out.prin tln("Architectu re " + System.getPrope rty("os.arch")) ;
    //for others, you should check System.getPrope rty of JAVA.

    To implement (f) and (g), you need to get information from two files (included in the assignment): \proc\cpuinfo and \proc\meminfo, and use StringTokenizer to retrieve required information from these two files.


    It seems really simple but I feel I am just not knowledgeable enough to grasp it.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by keke3905
    I really would appreciate some help on this assignment. I need to make GUI boxes to display the system info such as on Microsoft Office. I have some code but not sure where to go with the rest of it. Help please. I will also include instructions that I was given.. I am working in JGrasp environment with Java.

    In order to tuning programs to meet the hardware requirements and provide optimal performance, it is very important to retrieve system information for every program. In this assignment, you need to print out system information including:
    a. Display mode
    Width
    Height
    Bit depth
    Refresh rate
    b. OS information
    Name
    Version
    Architecture
    c. User information
    Name
    Country
    Language
    Home directory
    Working directory
    d. Java information
    Java version
    Installation path
    Class path
    Vendor
    Vendor URL
    e. Java Virtual Machine information
    Total VM memory
    Max VM memory
    Free VM memory
    f. CPU information
    processor
    vendor_id
    model name
    cpu MHZ
    cache size
    g. Physical memory information
    MemTotal
    MemFree
    Buffers
    Cached

    To implement (a), you need to write codes like:

    //The following codes are used to get display mode
    GraphicsEnviron ment ge = GraphicsEnviron ment.getLocalGr aphicsEnvironme nt();
    GraphicsDevice[] gs = ge.getScreenDev ices();
    for (int j = 0; j < 1 /* gs.length */; j++) { //Only one display
    DisplayMode dm = gs[j].getDisplayMode ();
    int width = dm.getWidth();
    int height = dm.getHeight();
    int bitdepth = dm.getBitDepth( );
    int refreshrate = dm.getRefreshRa te();
    }

    To implement (b) to (e), you need to write codes like:

    //The following codes are used to get OS information
    System.out.prin tln("Current OS Information");
    System.out.prin tln("Name " + System.getPrope rty("os.name")) ;
    System.out.prin tln("Version " + System.getPrope rty("os.version "));
    System.out.prin tln("Architectu re " + System.getPrope rty("os.arch")) ;
    //for others, you should check System.getPrope rty of JAVA.

    To implement (f) and (g), you need to get information from two files (included in the assignment): \proc\cpuinfo and \proc\meminfo, and use StringTokenizer to retrieve required information from these two files.


    It seems really simple but I feel I am just not knowledgeable enough to grasp it.
    where exactly are you having problems?

    Comment

    Working...