Using Fonts and Color in Applet

To display text, you must first select a font. A font is specified by its name, such as “Arial”, the style(plain, bold, italic, or bold italics), and the point size. Font, is an object in Java, so we need to create it via a call to new before we can use it.The setColor methods call selects a Colour that is used for all subsequent drawing operations.

Data Streams in Java

Data streams supports reading/writing of primitive data types(int, float, short, long, double, Boolean, char and byte) as well as String objects. Data streams are filtered streams,that is, they filter existing stream so that the primitive data types can be directly read from or written to the stream.

Vector in Java

The Vector class contained in the java.util package defines the methods used to store various objects into a single unit. It can be used to implements dynamic array called VECTOR.Vector can accommodate any number(any size) and any type(data type like int, float, char ) of objects.

StringBuffer Class in Java

String is a group of characters.Strings created using String class are of fixed length, whereas, string created using StringBuffer class are of varying length. We can append the string, reverse the string, insert the string at the particular position, removes character of the string at any index,in STRINGBUFFER class.

BufferedWriter in Java

A Buffer is a temporary storage area for data. The reader and writer classes provides character input and outout streams .The writer class is an output stream .It is an abstract class that cannot be directly instantiated.Creates a buffered character-output stream we use BufferedWriter class.

Java Thread Deadlock

Deadlock is a special type of error that needs to be avoided in multitasking. This mainly occurs, when two threads have interdependency on a pair of synchronized objects.

Suspending and Resuming Thread

Every thread may perform different tasks. Sometimes, it becomes necessay to suspend the execution of a thread for a period of time. This can be done by using suspend() method of the class. We can restart the thread by using resume() method.stop() is used to stop the thread, it cannot be restarted again.

JDesktopPane and JInternalFrame in Java

We can create multiple windows(more than one windows) in JInternal Frame class.This is also known as MDI(Multiple document interface).The JInternal Frame is same as Jframe class. We can add all the components (JButton,JTextField,JLabel etc)in all the internal frames.

Byte Streams in Java

The FileReader and FileWriter classes are used to read and write 16 bit characters. However,many fie systems use 8 bit bytes. The I/O system of Java provides numerous classes to handle 8 bit bytes. The FileInputStream and FileOutputStream are the most frequently used classes to handle bytes.


Reading and Writing Characters Streams in Java

The Reader and Writer class comprises various subclasses. These subclasses implement streams that can handle characters. The sub classes used to handle characters in file are FileReader and FileWriter. FileReader is used for reading characters from the file and FileWriter is used for writing character to the file.

Page 13 of 29

About Us

Rekha SetiaRekha Setia is a passionate blogger of Extra Computer Notes. if you have any ideas or any request me @