Thursday, October 30, 2008

Microsoft Word Shortcuts

Ctrl+Shift+Down Arrow : Select to the end of the paragraph

Ctrl+Shift+Up Arrow : Select to the Beginning of the paragraph

Ctrl+Shift+END :
Select to the End of the Document

Ctrl+Shift+HOME :
Select to the Beginning of the Document

Ctrl+Shift+> :
Increase Font Size

Ctrl+Shift+D :
Double Underline the selected document

Alt+Shift+D :
Insert Date Field at current insertion location

Note : If you want to choose different date format then click insert menu then choose date and time option from the menu. A dialogue box will be shown before you. Choose available format then click Default button to make the format default. Whenever you press Alt+Shift+D, the new format of the date will be inserted.

Page Down : Scroll down one screen

HOME :
To Go to the beginning of the line

END :
To Go to the end of the line

Page Up :
Scroll up one screen

Ctrl+Shift+< :
Decrease Font Size

Ctrl+Shift+ :
Superscript selected matter

Ctrl+Shift+W :
Underline Words without space

Ctrl+Shift+T :
Hanging Indent Deletion

Ctrl+Shift+K :
Small Caps

Ctrl+Shift+M :
Removes Indentation from paragraphs

Ctrl+Shift+A :
All caps

Ctrl+B :
Bold

Ctrl+I :
Italic

Ctrl+U :
Underline

Ctrl+] :
Font Size Increment by 1 point

Ctrl+[ :
Font Size Decrement by 1 point

Ctrl+T :
To Create Hanging Indent

Ctrl+R :
Right Align

Ctrl+L :
Left Align

Ctrl+K :
Hyperlink Insertion

Ctrl+Q :
To Remove Paragraph Formatting

Ctrl+END :
To go to the end of the document

Ctrl+1 :
Single Line Spacing

Ctrl+2 :
Double Line Spacing

Ctrl+5 :
Line Spacing one and half

Ctrl+E :
Center Align

Ctrl+D :
To change character formatting

Ctrl+G :
Go to option

Ctrl+F :
Find

Ctrl+J :
Justified Align

Alt+F10 :
To Maximize Window

Ctrl+F2 :
Print Preview

Shift+F3 :
Change Case

Shift+F7 :
Thesaurus

Ctrl+Shift+F12 :
To Print

Ctrl+P :
To Print

F3 :
Autotext insertion

F4 :
Repetition of Last Action (Repeat Last Command)

F8 :
To Extend Selection

F12 :
Save As Command

ALT+F3 :
Auto Text Entry Creation

ALT + F8 :
Macro Dialogue Box

Saturday, August 2, 2008

How To Insert An Image Into JAVA Applet

Sometimes we need to add an image or logo into JAVA applet. Here is how you can achieve the same. Program below illustrates this.

import java.awt.*;
import java.applet.*;


public class im extends Applet
{
Image img;

public void init()
{
img = getImage(getDocumentBase(), "ash.jpg");
}


public void paint(Graphics g)
{
g.drawImage(img,50,50,this);
}
}

Wednesday, July 30, 2008

How to compare two strings in JAVA :

To compare two strings in JAVA there is a equals() functions. if strings are not same this function will return false and if strings are same it will return true. Program below is an example to compare two string. The output of the given program will be "different". Because s1 and s2 is different.

class compare
{
public static void main(String[] args)
{
String s1,s2;
s1="abc";
s2="def";

if(s1.equals(s2))
{
System.out.println("Same");
}
else
{
System.out.println("Different");
}
}
}