The Biography, The Codes .
Return


The Biography, The Codes ...

- The text Code created by the wizard is black.
-
The new text Code to be add is red.
-
The text Code to be remove is navy and Strikethrough effects.

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

/**
* 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 'Biography'
* created in the main() method.
*/
public class Biography extends Form
{
// Variables
File fil ;
Image imag;
String CurrentDirectory;
int var = 2;
WinIOException erf = new WinIOException();

public Biography()
{
super();

// Required for Visual J++ Form Designer support
initForm();

// Current directory
CurrentDirectory = fil.getCurrentDirectory();

// Load Bitmap images
this.pictureBox1.setImage(imag.loadImage(fil.open(String.valueOf(CurrentDirectory.toString() + "\\Pic\\butterfly1.bmp"))));
this.pictureBox2.setImage(imag.loadImage(fil.open(String.valueOf(CurrentDirectory.toString() + "\\Pic\\butterfly2.bmp"))));
this.pictureBox1.show();
this.pictureBox2.hide();

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

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

public void formClose(Event e)
{
this.close();
}


private void timer1_timer(Object source, Event e)
{
switch ( var )
{
case 1:
{
this.pictureBox2.hide();
this.pictureBox1.show();
var = 2;
break;

}
case 2:
{
this.pictureBox1.hide();
this.pictureBox2.show();
var = 1;
break;
}
}
}


/**
* 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.
*/

Button btnclose = new Button();
Label memoryLabel = new Label();
PictureBox pictureBox1 = new PictureBox();
Label availableMemoryLabel = new Label();
GroupBox groupBox1 = new GroupBox();
Label label3 = new Label();
Label label5 = new Label();
Label label6 = new Label();
Label label7 = new Label();
Label label4 = new Label();
Timer timer1 = new Timer(components);
PictureBox pictureBox2 = new PictureBox();

private void initForm()
{

this.setText("Biography...");
this.setClientSize (new Point(300,300));
this.setAutoScaleBaseSize(13);
this.setClientSize(new Point(486, 139));
this.setMaximizeBox(false);
this.setStartPosition(FormStartPosition.CENTER_SCREEN);

btnclose.setLocation(new Point(360, 104));
btnclose.setSize(new Point(88, 23));
btnclose.setTabIndex(0);
btnclose.setText("Close");

memoryLabel.setLocation(new Point(112, 112));
memoryLabel.setSize(new Point(144, 16));
memoryLabel.setTabIndex(1);
memoryLabel.setTabStop(false);
memoryLabel.setText("Memory available to system : ");

pictureBox1.setLocation(new Point(8, 16));
pictureBox1.setSize(new Point(72, 80));
pictureBox1.setTabIndex(2);
pictureBox1.setTabStop(false);
pictureBox1.setText("pictureBox1");
pictureBox1.setSizeMode(PictureBoxSizeMode.AUTO_SIZE);

availableMemoryLabel.setLocation(new Point(264, 112));
availableMemoryLabel.setSize(new Point(72, 16));
availableMemoryLabel.setTabIndex(3);
availableMemoryLabel.setTabStop(false);
availableMemoryLabel.setText("");

groupBox1.setLocation(new Point(104, 96));
groupBox1.setSize(new Point(368, 1));
groupBox1.setTabIndex(4);
groupBox1.setTabStop(false);
groupBox1.setText("");

label3.setLocation(new Point(112, 0));
label3.setSize(new Point(336, 16));
label3.setTabIndex(5);
label3.setTabStop(false);
label3.setText("Name : Churi Simon Zouein");

label5.setLocation(new Point(112, 16));
label5.setSize(new Point(360, 16));
label5.setTabIndex(6);
label5.setTabStop(false);
label5.setText("Address : Sed el Baouchrie, Ferdaous st., korlokian Bld, Beirut-Lebanon.");

label6.setLocation(new Point(112, 48));
label6.setSize(new Point(384, 16));
label6.setTabIndex(7);
label6.setTabStop(false);
label6.setText("Signification : Engineer on Computing and Software Systems Science. ");

label7.setLocation(new Point(112, 72));
label7.setSize(new Point(80, 16));
label7.setTabIndex(8);
label7.setTabStop(false);
label7.setText("Copyright 2003");

label4.setLocation(new Point(112, 32));
label4.setSize(new Point(256, 16));
label4.setTabIndex(9);
label4.setTabStop(false);
label4.setText("Tel : 01- 691436");

timer1.setEnabled(true);
/* @designTimeOnly timer1.setLocation(new Point(24, 96)); */

pictureBox2.setLocation(new Point(8, 16));
pictureBox2.setSize(new Point(72, 80));
pictureBox2.setTabIndex(11);
pictureBox2.setTabStop(false);
pictureBox2.setText("pictureBox2");

this.setNewControls(new Control[] {
pictureBox2,
label4,
label7,
label6,
label5,
label3,
groupBox1,
availableMemoryLabel,
pictureBox1,
memoryLabel,
btnclose});

}

/**
* 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 Biography());
}
}