Application developed with Visual J++, Part 1.


1st Step
, Create a Microsoft visual J++ Application
.


First, run the Microsoft Visual J++ 6.

  1.  From the File menu, select New Project
  2. The New Project dialog box appears, select  the Tab New
  3. Select  the item folder 'Applications' and then select the Windows Application icon.
  4. Type the name of application (project) 'TestVJ'.
  5. The Location of the application (project) - 'C:\TestVJ'.
  6.  Click Open, and Visual J++ creates a project with that name.
  7. The new project will appear as a new node in the Project Explorer Window
  8. The project contains a form  called Form1.java by default
  9. Project Explorer Window
    Displays a hierarchical list of the solution and a list of the entire collection of projects, and all of the items contained in each project. Each project type determines the specific hierarchy structure. You can:
    • View multiple projects of different packages and project types at the same time.
    • Make a project active by selecting it.
    • Rename your projects or project items by right-clicking on the selected item, selecting Rename from the context menu, and typing the new name.
    • You can expand and collapse the project lists and view the projects and items included in the project by clicking plus (+) or minus (-) to the left of the project name.

    List Window Lists the all loaded projects with the items included in each project and additional items. You must have at least one project open all the time.

    • Solution : The name of the solution is visible when a solution exists, a single project has been loaded using a version control program, or a solution has multiple deployment configurations.
      Double-clicking the Solution expands or collapses the project nodes in the group.
    • control project and currently has read/write status.

    The hierarchical create by this project:

    Solution 'TestVJ' (1 project)     - the Solution name
      TestVJ   - the Project name
        Form1 .. - the Form name
           
  10. The Form1.java, Form properties ( no controls include)
    Items values
    MaximizeBox:
    menu:
    Sze:
    StartPosition:
    Text:
    True
    none
    300, 300
    Windows default
    Form1


  11. The Form1.java Codes... (created by Visual J++)

    - The text Code created by the wizard is black.

    import com.ms.wfc.app.*;
    import com.ms.wfc.core.*;
    import com.ms.wfc.ui.*;
    import com.ms.wfc.html.*;

    /**
    * This class can take a variable number of parameters on the command
    * line. Program execution begins with the main() method. The class
    * constructor is not invoked unless an object of type 'Form1' is
    * created in the main() method.
    */
    public class Form1 extends Form
    {
    public Form1()
    {
    // Required for Visual J++ Form Designer support
    initForm();

    // TODO: Add any constructor code after initForm call
    }

    /**
    * Form1 overrides dispose so it can clean up the
    * component list.
    */
    public void dispose()
    {
    super.dispose();
    components.dispose();
    }

    /**
    * NOTE: The following code is required by the Visual J++ form
    * designer. It can be modified using the form editor. Do not
    * modify it using the code editor.
    */
    Container components = new Container();

    private void initForm()
    {
    this.setSize (new Point(300,300));
    this.setText ("Form1");
    }

    /**
    * The main entry point for the application.
    *
    * @param args Array of parameters passed to the application
    * via the command line.
    */
    public static void main(String args[])
    {
    Application.run(new Form1());
    }
    }



Previous
  Home
1
 
Next