Amit: " My uncle knew just two words of English when he came to Bombay, and he is a millionaire today." Manav: "How exiting, by the way what were the words?" Amit: "Hands up!"
A guy gets lost while on vacation and walks into the local pub to ask for the quickest way back to the town. "Are you walking or driving," asks the barman. "Driving," said the man. "Well, that's the quickest I know."
Manish: "Somebody actually complicated me on my driving today." Harish: "What did he say?" Manish: "I found a note on my windshield that read 'Parking Fine'."
A man upon his engagement went to his father and said, "I've found a woman just like mother" His father replies, "So what do you want from me, Sympathy?"
|
|||
Listing 1.1 MyFrame.java (Complete code)import javax.swing.*; import java.awt.*; import java.awt.event.*; //Class used to show a Frame public class MyFrame extends JFrame { //Constructor public MyFrame(){ super("MyFrame"); //Construct a new TextArea JTextArea ta = new JTextArea(6,16); //Set the text of this //TextComponent to the specified text ta.setText("\n\n Creating Executable files"); //Set the current font ta.setFont(new Font("Serif",Font.BOLD+Font.ITALIC,30)); //Set the specified boolean to indicate //whether or not this TextComponent //should be editable ta.setEditable(false); //Get the content pane object. getContentPane().add(ta); //Add the specified window listener //to receive window events from this window this.addWindowListener(new WindowHandler()); //Pack the window pack(); //Set the window visible show(); } //Main method public static void main(String args[]){ new MyFrame(); } //Class used to handle window events private class WindowHandler extends WindowAdapter{ public void windowClosing(WindowEvent we){ System.exit(0); } } } The design of the class is very simple. Comments are included in the source code to help you.
|
|||
|
|||
© 2001 www.universalteacher.com. All rights reserved |