Easy to Learn Java: Programming Articles, Examples and Tips

Start with Java in a few days with Java Lessons or Lectures

Home

Code Examples

Java Tools

More Java Tools!

Java Forum

All Java Tips

Books

Submit News
Search the site here...
Search...
 
Search the JavaFAQ.nu
1000 Java Tips ebook

1000 Java Tips - Click here for the high resolution copy!1000 Java Tips - Click here for the high resolution copy!

Java Screensaver, take it here

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java programming articles and tips. Please take your copy here.

Take your copy of free "Java Technology Screensaver"!.

Easy Learn Java: Programming Articles, Examples and Tips - Page 302


Previous 1060 Stories (530 Pages, 2 Per Page) Next

The Java Lesson 26: Introduction to graphical programming and the java.awt packa

Go to all tips in Java Lessons by Jon Huhtala
All Java Lessons contents page | Java Lesson 1 | Java Lesson 2 | Java Lesson 3 | Java Lesson 4 | Java Lesson 5 | Java Lesson 6 | Java Lesson 7 | Java Lesson 8 | Java Lesson 9 | Java Lesson 10 | Java Lesson 11 | Java Lesson 12 | Java Lesson 13 | Java Lesson 14 | Java Lesson 15 | Java Lesson 16 | Java Lesson 17 | Java Lesson 18 | Java Lesson 19 | Java Lesson 20 | Java Lesson 21 | Java Lesson 22 | Java Lesson 23 | Java Lesson 24 | Java Lesson 25 | Java Lesson 26 | Java Lesson 27 | Java Lesson 28 | Java Lesson 29 | Java Lesson 30 | Java Lesson 31 | Java Lesson 32 | Java Lesson 33 | Java Lesson 34 | Java Lesson 35 | Java Lesson 36 | Java Lesson 37 | Java Lesson 38 | Java Lesson 39 | Java Lesson 40 | Java Lesson 41 | Java Lesson 42 | Java Lesson 43 | Java Lesson 44 | Java Lesson 45 | Java Lesson 46

Introduction to graphical programming and the java.awt package


Graphical programming

  • Is used in Windows applications as well as web-based applets.

  • Provides a Graphical User Interface (GUI). It incorporates the mouse for user input and more visual display features, such as color images, for output.

  • Typically displays multiple controls (menus, buttons, scroll bars, etc.) upon which the user may act

  • Puts the user in charge. While text-based programs rigidly lead the user via prompts and simple menus, graphical programs provide a wide range of choices and let the user determine the order of actions.

  • Is event-driven and far more complex internally than text-based programming. The logic path is difficult to follow.

Event-driven programs

  • Define, arrange, and display components upon which the user may act. Typical components include buttons, text boxes, check boxes, radio buttons, scroll bars, and menu bars. The variety is nearly infinite.

  • Ask the JVM to be notified whenever the user acts upon specified components (clicks a button, selects a menu item, etc.). Such actions are called events.

  • Contain methods to handle each event. These perform the bulk of application or applet processing. What they do depends upon the application or applet and which control the user activated.

  • Are difficult to read. Logic does not flow from top to bottom like a procedural program. Rather, it jumps from one event handler to another in response to user actions.

The Abstract Windows Toolkit (AWT)

  • Is contained in the java.awt package. It consists of classes for creating user interfaces and for painting graphics and images.

  • Helps create components. In AWT terminology, a user interface object (such as a button) is a component. The Component class is the root of all AWT components.

  • Helps organize and arrange components. A container is a component that can contain components and other containers. A container can also have a layout manager that controls the visual placement of components within the container. The AWT package contains several layout manager classes and an interface for building your own layout manager.

  • Helps identify and respond to component events. Some components fire events when a user interacts with the components. The AWTEvent class and its subclasses are used to represent the events that AWT components can fire.

  • Is complex. Refer to the help facility of your development environment or the official Sun API specification for details.


Anatomy of a small windows program

The following is the source code of a small Java program to create and display a window having a single button:

import java.awt.*;
import java.awt.event.*;

public class App extends Frame implements WindowListener, ActionListener {

Button b;

public static void main(String[] args) {
App myWindow = new App("My first window");
myWindow.setSize(250,75);
myWindow.setVisible(true);
}

public App(String title) {
super(title);
setLayout(new FlowLayout());
addWindowListener(this);
b = new Button("Click me");
add(b);
b.addActionListener(this);
}

public void actionPerformed(ActionEvent e) {
b.setLabel("Ouch!!");
}

public void windowClosing(WindowEvent e) {
dispose();
System.exit(0);
}

public void windowOpened(WindowEvent e) {}
public void windowActivated(WindowEvent e) {}
public void windowIconified(WindowEvent e) {}
public void windowDeiconified(WindowEvent e) {}
public void windowDeactivated(WindowEvent e) {}
public void windowClosed(WindowEvent e) {}
}

Notes:

  1. The import statements make it easy to access the necessary packaged AWT code

  2. By extending the Frame class, the App class inherits the features and look of a frame window

  3. The WindowListener interface is implemented in order to be notified of certain window events (such as iconifying, deiconifying, and closing the window)

  4. The ActionListener interface is implemented in order to be notified of certain action events to container components (such as a button being clicked)

  5. The Button reference, b, is an instance variable of the class

  6. The main() method is the first method executed. It instantiates the frame, sets its size, and makes it visible.

  7. The class constructor receives the frame's title as a parameter which it passes through to the superclass constructor. It then sets the layout manager of the frame to FlowLayout, registers a WindowListener so the frame will be notified of window events, instantiates the button and adds it to the frame, and registers an ActionListener for the button so the frame will be notified when the user clicks the button.

  8. The actionPerformed() method is required by the ActionListener interface. It is automatically called when the user clicks the button and receives an ActionEvent object as a parameter. In this sample, it handles the event by changing the label of the button.

  9. The windowClosing() method is required by the WindowListener interface. It is automatically called when the user closes the frame and receives a WindowEvent object as a parameter. In this sample, it disposes of frame resources and terminates the JVM.

  10. The remaining methods are required by the WindowListener interface. In this sample, they do nothing.

Lab exercise for Ferris students

E-mail your answers to this assignment no later than the due date listed in the class schedule.

Review questions

  1. Assume a class named MyFrame properly extends Frame and has a constructor that accepts the frame's title as a parameter and sets the label component "Hello World!" within the frame's container. What will result from an attempt to compile and execute the following main() method?

1
2
3
4
public static void main(String[] args) {
MyFrame x = new MyFrame("Here goes");
x.setSize(50,200);
}
  1. the label "Hello World!" will display in a frame that is wider than it is tall

  2. the label "Hello World!" will display in a frame that is taller than it is wide

  3. the program will compile but nothing will display

  4. a compile error will occur at line 2

  5. a compile error will occur at line 3

  1. Which of the following ends the processing of a Windows program written in Java?

  1. System.exit(0);

  2. dispose();

  3. reaching the end of the main() method

  4. the user clicking the close button for the window

  5. windowClosing(this);

  1. If zButton has been properly defined as the reference for a Button object, what will happen during program execution if the button is instantiated using only the following code? (choose four)

1
2
zButton = new Button("YES");
add(zButton);
  1. the button will have the label "YES"

  2. the button component will be part of the frame's container

  3. the actionPerformed() method will be automatically called when the user clicks the button

  4. the button will remain in memory if the frame window is iconified

  5. the button's text could be changed by executing the statement: zButton.setLabel("NO");

  1. Which of the following methods is not required by the WindowListener interface?

  1. windowOpened(WindowEvent e)

  2. windowActivated(WindowEvent e)

  3. windowResized(WindowEvent e)

  4. windowDeiconified(WindowEvent e)

  5. windowClosed(WindowEvent e)


11055 bytes more | 5 comments | Printer Friendly Page  Send to a Friend | Score: 5
Posted by jalex on Thursday, February 10, 2005 (00:00:00) (12261 reads)

The Java Lesson 25: Interfaces, instanceof, and object conversion and casting

Go to all tips in Java Lessons by Jon Huhtala
All Java Lessons contents page | Java Lesson 1 | Java Lesson 2 | Java Lesson 3 | Java Lesson 4 | Java Lesson 5 | Java Lesson 6 | Java Lesson 7 | Java Lesson 8 | Java Lesson 9 | Java Lesson 10 | Java Lesson 11 | Java Lesson 12 | Java Lesson 13 | Java Lesson 14 | Java Lesson 15 | Java Lesson 16 | Java Lesson 17 | Java Lesson 18 | Java Lesson 19 | Java Lesson 20 | Java Lesson 21 | Java Lesson 22 | Java Lesson 23 | Java Lesson 24 | Java Lesson 25 | Java Lesson 26 | Java Lesson 27 | Java Lesson 28 | Java Lesson 29 | Java Lesson 30 | Java Lesson 31 | Java Lesson 32 | Java Lesson 33 | Java Lesson 34 | Java Lesson 35 | Java Lesson 36 | Java Lesson 37 | Java Lesson 38 | Java Lesson 39 | Java Lesson 40 | Java Lesson 41 | Java Lesson 42 | Java Lesson 43 | Java Lesson 44 | Java Lesson 45 | Java Lesson 46

Interfaces, instanceof, and object conversion and casting


Overview

In the previous lesson, you learned that an object reference can point to an object of a descendant class. For example, if vehiclePtr is a Vehicle object reference and Car, Rowboat, Airplane, and MotorCycle are subclasses of Vehicle, it is not obvious what kind of object vehiclePtr is referencing.

vehiclePtr

----->

?

In this lesson, you will learn how to determine the type of an object. You will also learn how to convert and cast an object so that it can be referenced and used in a variety of ways. The concept is similar to the conversion and casting of primitives, but an object's type never changes.

Finally, you will learn how to define and use an interface to further categorize a class and force certain behavior upon it.

The instanceof operator

  • Is a Java keyword

  • Can be used to determine the type of an object. The general syntax for using the instanceof keyword is as follows:

object-reference instanceof class-name

For example, using the class hierarchy mentioned above, if vPointer is a Vehicle object reference that is currently pointing to a Rowboat object, the following expression will evaluate to true

vPointer instanceof Rowboat

  • Example: The following program is a variation of the sample used in the previous lesson. It constructs an array of Mammal object references and loads it with a mix of Cat and Mouse objects. It then uses instanceof to display information about only the Cat objects.

public class App {
public static void main(String[] args) {

// Declare an array of superclass object references.

Mammal[] pets = new Mammal[5];

// Load the array with objects that descend from the superclass.

pets[0] = new Cat("Fluffy", 10);
pets[1] = new Mouse("Speedy", 1);
pets[2] = new Mouse("Mickey", 2);
pets[3] = new Cat("Tiger", 3);
pets[4] = new Cat("Garfield", 15);

// Display information about cats. Other objects will be skipped.

Utility.skip();
for (int i = 0; i < pets.length; i++) {
if (pets[i] instanceof Cat)
System.out.println(" " + pets[i].toString());
}
}
}

abstract class Mammal {
private String name;
public Mammal(String iName) {
setName(iName);
}
public boolean setName(String nName) {
if (nName.length() > 0) {
name = nName;
return true;
}
else {
name = "unknown";
return false;
}
}
public String getName() {
return name;
}
public abstract boolean setAge(int nAge);
public abstract int getAge();
public abstract String toString();
}

class Cat extends Mammal {
private int age;
public static final int MAX_LIFE = 25;
public Cat(String iName, int iAge) {
super(iName);
setAge(iAge);
}
public boolean setAge(int nAge) {
if (nAge >= 0 && nAge <= MAX_LIFE) {
age = nAge;
return true;
}
else
return false;
}
public int getAge() {
return age;
}
public String toString() {
return getName() + " (cat), " + age;
}
}

class Mouse extends Mammal {
private int age;
public static final int MAX_LIFE = 5;
public Mouse(String iName, int iAge) {
super(iName);
setAge(iAge);
}
public boolean setAge(int nAge) {
if (nAge >= 0 && nAge <= MAX_LIFE) {
age = nAge;
return true;
}
else
return false;
}
public int getAge() {
return age;
}
public String toString() {
return this.getName() + " (mouse), " + age;
}
}


Object conversion and casting

  • Make it possible to reference an object in a different way by assigning it to an object reference of a different type.

  • "Object conversion" is handled automatically by the compiler. You have already seen an example in the above program where Cat and Mouse objects are assigned to the elements within an array of Mammal object references. The compiler will let you assign an object to an object reference of an ancestor type (a class from which it descends in the class hierarchy).

"Object conversion" is really a misnomer as the object itself is NOT converted or changed in any way. Once instantiated, an object NEVER changes its type (a Cat will always be a Cat). The concept, however, is similar to the "widening conversions" performed on primitive data types.

  • "Object casting" is needed when the compiler doesn't recognize an automatic conversion. The concept is similar to the casting of primitive data types to perform a "narrowing conversion".

For example, based upon the following class hierarchy

Object

Mammal

Cat

Manx

The compiler would NOT permit the following:

Cat x = new Cat();
Manx y = x;

The second statement will result in an "incompatible types" error message. The statement attempts to assign a Cat object to a Manx object reference. Because Manx is below Cat in the hierarchy, this is not automatically allowed.

The following, however will compile successfully:

Cat x = new Cat();
Manx y = (Manx) x;

It is ultimately the programmer's responsibility to ensure that such a cast is appropriate.

The most common use of "object casting" is when calling certain packaged Java methods that return a reference to a generic Object. The narrowing conversion requires an explicit cast as shown by the following diagram:

Application

Some packaged Java method

Uses a reference to an object of a particular type

automatic conversion

Uses a reference to a generic Object

------->

explicit cast

<-------

  • Example: The following program is another variation on the sample used in the previous lesson. It constructs a Vector object (a growable array of generic Object references) and loads it with a mix of Cat and Mouse objects. It then loops to retrieve the generic Object references, casts them as Mammal object references, and displays information about the Cat or Mouse object.

import java.util.*;
public class App {
public static void main(String[] args) {

// Declare a Vector (a growable array).

Vector pets = new Vector();

// Load the Vector with various Cat and Mouse objects.

pets.add(new Cat("Fluffy", 10));
pets.add(new Mouse("Speedy", 1));
pets.add(new Mouse("Mickey", 2));
pets.add(new Cat("Tiger", 3));
pets.add(new Cat("Garfield", 15));

// Display information extracted from the Vector.

Utility.skip();
for (int i = 0; i < pets.size(); i++) {
Mammal critter = (Mammal) pets.get(i);
System.out.println(" " + critter.getName() + " is " +
critter.getAge());
}
}
}

abstract class Mammal {
private String name;
public Mammal(String iName) {
setName(iName);
}
public boolean setName(String nName) {
if (nName.length() > 0) {
name = nName;
return true;
}
else {
name = "unknown";
return false;
}
}
public String getName() {
return name;
}
public abstract boolean setAge(int nAge);
public abstract int getAge();
public abstract String toString();
}

class Cat extends Mammal {
private int age;
public static final int MAX_LIFE = 25;
public Cat(String iName, int iAge) {
super(iName);
setAge(iAge);
}
public boolean setAge(int nAge) {
if (nAge >= 0 && nAge <= MAX_LIFE) {
age = nAge;
return true;
}
else
return false;
}
public int getAge() {
return age;
}
public String toString() {
return getName() + " (cat), " + age;
}
}

class Mouse extends Mammal {
private int age;
public static final int MAX_LIFE = 5;
public Mouse(String iName, int iAge) {
super(iName);
setAge(iAge);
}
public boolean setAge(int nAge) {
if (nAge >= 0 && nAge <= MAX_LIFE) {
age = nAge;
return true;
}
else
return false;
}
public int getAge() {
return age;
}
public String toString() {
return this.getName() + " (mouse), " + age;
}
}

Notes:

  1. To use the Vector class, the java.util package must be imported

  2. The add() method of the Vector class is used to add a generic Object reference to the Vector object. A widening conversion will automatically be performed.

  3. The size() method of the Vector class is used to determine how many Object references the Vector object contains.

  4. The get() method of the Vector class is used to retrieve a generic Object reference stored in the specified index location of the Vector object. An explicit cast is needed in order to assign the object to a reference of the appropriate type (in this case a Mammal). Without the cast, this program will not compile.

Interfaces

  • Are similar to classes that contain ONLY abstract methods. They can have no instance variables, they can have no constructor, and they can have no instance methods that have a body.

  • Are defined with the interface keyword. The general syntax is:

interface interface-name {
abstract methods go here...
}

All methods of an interface MUST be abstract so the abstract keyword can be omitted (it is implied). For example, in advanced Java you will learn about the WindowListener interface in the java.awt.event package. The code for this interface is as follows:

interface WindowListener {
public void windowActivated(WindowEvent e);
public void windowClosed(WindowEvent e);
public void windowClosing(WindowEvent e);
public void windowDeactivated(WindowEvent e);
public void windowDeiconified(WindowEvent e);
public void windowIconified(WindowEvent e);
public void windowOpened(WindowEvent e);
}

  • Are implemented by a class via the implements keyword to represent an "is a" relationship. Technically, they do NOT violate Java's restriction of single-inheritance because interfaces don't encapsulate anything (so there is nothing to inherit). For example, the class header for a Windows program might be coded as follows:

public class App extends Frame implements WindowListener

Which indicates that the App class "is a" Frame and "is a" WindowListener. If more than one interface is implemented by a class, the interface names are simply coded as a list as shown by the following example:

public class App extends Frame implements WindowListener, ActionListener

Which is the header of a Windows program that implements the WindowListener and the ActionListener interfaces. You will learn what these (and other) packaged interfaces do in advanced Java.

  • Force implementing classes to define their abstract methods. Failure to do so will result in a compile error. For example, a class that implements the WindowListener interface must define all seven of its required methods.

  • Are detected by the instanceof operator. For example, if myApp is an App class object whose class header was coded as shown above, the following expression would evaluate as true:

myApp instanceof WindowListener

  • Can be used as a "type" for an object reference. When used this way, the object being referenced must be of a class that either implements the interface or descend from one that does. Such references can be converted and cast in much the same way as when a class name is used as the "type". For example, based upon the most recent of the App class headers shown above, the following code is valid:

WindowListener a = new App();
Object b = a;
ActionListener c = (ActionListener) b;
App d = (App) c;

The key to understanding this code is that ONLY ONE App OBJECT EXISTS. The result is to have four references of different types for that single object. The construction and "processing" of the object are as follows:

  1. It was instantiated by the first statement as an App object and assigned to WindowListener reference a. The compiler allows this because it is a widening conversion (an App "is a" WindowListener).

  2. It was then assigned to Object reference b. This is allowed because it is a widening conversion (an App "is an" Object).

  3. It was then assigned to ActionListener reference c. The compiler requires a cast for this because it sees it as a narrowing conversion (an Object "is NOT" an ActionListener). The cast will work at runtime, however, because the JVM will see that an App object that "is an" ActionListener.

  4. It was finally assigned to App reference d. The compiler requires a cast for this because it sees it as a narrowing conversion (an ActionListener "is NOT" an App). The cast will work at runtime, however, because the JVM will see that an App object "is an" App.

  • Example: The following program is yet another variation on the previous samples. It contains the definition of a Cat class and a Porcupine class that are both subclasses of Mammal. It also defines an interface named Petable that is implemented by Cat, but not by Porcupine. The application class constructs an array of Mammal object references and loads it with a mix of Cat and Porcupine objects. It then uses instanceof to display information about only the Petable objects.

public class App {
public static void main(String[] args) {

// Declare an array of superclass object references.

Mammal[] pets = new Mammal[5];

// Load the array with objects that descend from the superclass.

pets[0] = new Cat("Fluffy", 10);
pets[1] = new Porcupine("Spike", 4);
pets[2] = new Porcupine("Needles", 7);
pets[3] = new Cat("Tiger", 3);
pets[4] = new Cat("Garfield", 15);

// Display information about Petable objects. Others will be skipped.

Utility.skip();
for (int i = 0; i < pets.length; i++) {
if (pets[i] instanceof Petable)
System.out.println(" " + pets[i].getName() + ": " +
((Petable) pets[i]).likes());
}
}
}

interface Petable {
public String likes();
}


abstract class Mammal {
private String name;
public Mammal(String iName) {
setName(iName);
}
public boolean setName(String nName) {
if (nName.length() > 0) {
name = nName;
return true;
}
else {
name = "unknown";
return false;
}
}
public String getName() {
return name;
}
public abstract boolean setAge(int nAge);
public abstract int getAge();
public abstract String toString();
}

class Cat extends Mammal implements Petable {
private int age;
public static final int MAX_LIFE = 25;
public Cat(String iName, int iAge) {
super(iName);
setAge(iAge);
}
public boolean setAge(int nAge) {
if (nAge >= 0 && nAge <= MAX_LIFE) {
age = nAge;
return true;
}
else
return false;
}
public int getAge() {
return age;
}
public String toString() {
return getName() + " (cat), " + age;
}
public String likes() {
return "Scratch behind ears";
}
}

class Porcupine extends Mammal {
private int age;
public static final int MAX_LIFE = 10;
public Porcupine(String iName, int iAge) {
super(iName);
setAge(iAge);
}
public boolean setAge(int nAge) {
if (nAge >= 0 && nAge <= MAX_LIFE) {
age = nAge;
return true;
}
else
return false;
}
public int getAge() {
return age;
}
public String toString() {
return this.getName() + " (porcupine), " + age;
}
}

Notes:

  1. The Petable interface has only one abstract method named likes() which must be defined by any class that implements the interface.

  2. The Cat class implements the Petable interface and defines the required likes() method.

  3. The application class loads the array of Mammal object references and then loops to find objects that implement the Petable interface. When one is found, information about the object is displayed. Notice how the object must be cast in order to call its likes() method.

Looking ahead

For convenience, Java allows a class to be defined within another class and even inside a method. Such classes are known as "inner classes" and are the subject of the next lesson.

Lab exercise for Ferris students

E-mail your answers to this assignment no later than the due date listed in the class schedule.

Review questions

  1. Based upon the following class headers, if x is an object of the Appliance class and y is an object of the Washer class which of the expressions below will evaluate to true? (choose three)

public abstract class Item
public class Appliance extends Item
public class Washer extends Appliance implements Electricity, Plumbing

  1. x instanceof Object

  2. y instanceof Plumbing

  3. x instanceof Electricity

  4. y instanceof Item

  5. x instanceof Washer

  1. Based upon these class headers where each instantiable class has a no-argument constructor, if x is an object of the Appliance class and y is an object of the Washer class which of the statements below will compile? (choose three)

public abstract class Item
public class Appliance extends Item
public class Washer extends Appliance implements Electricity, Plumbing

  1. Item z = new Item();

  2. Electricity e = y;

  3. Appliance a = y;

  4. Electricity e = new Washer();

  5. Washer w = x;

  1. Java's Runnable interface contains the following code:

interface Runnable {
public void run();
}

Based upon this information, which of the following class definitions will compile successfully? (choose two)

  1. public class App extends Runnable {
    }

  2. public class App implements Runnable {
    public void run();
    }

  3. public abstract class App implements Runnable {
    }

  4. public class App implements Runnable {
    public void run() {}
    }

  1. True or False: If Frame is a subclass of Window and x is the reference of a Window object, the following statement changes the Window object into a Frame object.

Frame y = (Frame) x;

  1. True

  2. False


33829 bytes more | 4 comments | Printer Friendly Page  Send to a Friend | Score: 4.25
Posted by jalex on Monday, February 07, 2005 (00:00:00) (21954 reads)

Previous 1060 Stories (530 Pages, 2 Per Page) Next

530| 529| 528| 527| 526| 525| 524| 523| 522| 521| 520| 519| 518| 517| 516| 515| 514| 513| 512| 511| 510| 509| 508| 507| 506| 505| 504| 503| 502| 501| 500| 499| 498| 497| 496| 495| 494| 493| 492| 491| 490| 489| 488| 487| 486| 485| 484| 483| 482| 481| 480| 479| 478| 477| 476| 475| 474| 473| 472| 471| 470| 469| 468| 467| 466| 465| 464| 463| 462| 461| 460| 459| 458| 457| 456| 455| 454| 453| 452| 451| 450| 449| 448| 447| 446| 445| 444| 443| 442| 441| 440| 439| 438| 437| 436| 435| 434| 433| 432| 431| 430| 429| 428| 427| 426| 425| 424| 423| 422| 421| 420| 419| 418| 417| 416| 415| 414| 413| 412| 411| 410| 409| 408| 407| 406| 405| 404| 403| 402| 401| 400| 399| 398| 397| 396| 395| 394| 393| 392| 391| 390| 389| 388| 387| 386| 385| 384| 383| 382| 381| 380| 379| 378| 377| 376| 375| 374| 373| 372| 371| 370| 369| 368| 367| 366| 365| 364| 363| 362| 361| 360| 359| 358| 357| 356| 355| 354| 353| 352| 351| 350| 349| 348| 347| 346| 345| 344| 343| 342| 341| 340| 339| 338| 337| 336| 335| 334| 333| 332| 331| 330| 329| 328| 327| 326| 325| 324| 323| 322| 321| 320| 319| 318| 317| 316| 315| 314| 313| 312| 311| 310| 309| 308| 307| 306| 305| 304| 303|
302
| 301| 300| 299| 298| 297| 296| 295| 294| 293| 292| 291| 290| 289| 288| 287| 286| 285| 284| 283| 282| 281| 280| 279| 278| 277| 276| 275| 274| 273| 272| 271| 270| 269| 268| 267| 266| 265| 264| 263| 262| 261| 260| 259| 258| 257| 256| 255| 254| 253| 252| 251| 250| 249| 248| 247| 246| 245| 244| 243| 242| 241| 240| 239| 238| 237| 236| 235| 234| 233| 232| 231| 230| 229| 228| 227| 226| 225| 224| 223| 222| 221| 220| 219| 218| 217| 216| 215| 214| 213| 212| 211| 210| 209| 208| 207| 206| 205| 204| 203| 202| 201| 200| 199| 198| 197| 196| 195| 194| 193| 192| 191| 190| 189| 188| 187| 186| 185| 184| 183| 182| 181| 180| 179| 178| 177| 176| 175| 174| 173| 172| 171| 170| 169| 168| 167| 166| 165| 164| 163| 162| 161| 160| 159| 158| 157| 156| 155| 154| 153| 152| 151| 150| 149| 148| 147| 146| 145| 144| 143| 142| 141| 140| 139| 138| 137| 136| 135| 134| 133| 132| 131| 130| 129| 128| 127| 126| 125| 124| 123| 122| 121| 120| 119| 118| 117| 116| 115| 114| 113| 112| 111| 110| 109| 108| 107| 106| 105| 104| 103| 102| 101| 100| 99| 98| 97| 96| 95| 94| 93| 92| 91| 90| 89| 88| 87| 86| 85| 84| 83| 82| 81| 80| 79| 78| 77| 76| 75| 74| 73| 72| 71| 70| 69| 68| 67| 66| 65| 64| 63| 62| 61| 60| 59| 58| 57| 56| 55| 54| 53| 52| 51| 50| 49| 48| 47| 46| 45| 44| 43| 42| 41| 40| 39| 38| 37| 36| 35| 34| 33| 32| 31| 30| 29| 28| 27| 26| 25| 24| 23| 22| 21| 20| 19| 18| 17| 16| 15| 14| 13| 12| 11| 10| 9| 8| 7| 6| 5| 4| 3| 2| 1|


Home Code Examples Java Forum All Java Tips Books Submit News, Code... Search... Offshore Software Tech Doodling

RSS feed Java FAQ RSS feed Java FAQ News     

    RSS feed Java Forums RSS feed Java Forums

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.

Interactive software released under GNU GPL, Code Credits, Privacy Policy