Thursday, July 7, 2011

Windows Version Identification
To determine the version of Windows XP that you are running, follow these steps:
Click Start, and then click Run.
In the Open box, type winver.exe, and then click OK. The version number is displayed in the About Windows box.

Windows DirectX Version Identification
To use the DirectX Diagnostic Tool to determine the version of DirectX that is installed on your computer, follow these steps:

Click Start, and then click Run.
Type dxdiag, and then click OK.

On the System tab, note the version of DirectX displayed on the DirectX Version line.
On the DirectX Files tab, check the version information for each DirectX file.
When you are finished checking file versions, click Exit.

If Windows cannot find the dxdiag program, DirectX version 5.0 or earlier is installed on your computer. If this is the case, download and install the current version of DirectX.

Classical Game: Double Dragon

Example 1

Example 2

Sunday, June 26, 2011

How to write a chessboard in JAVA?

import javax.swing.*;
import java.awt.*;

public class ChessBoard {

JFrame frame;
JPanel squares[][] = new JPanel[8][8];

public ChessBoard() {
frame = new JFrame("Chess Board");
frame.setSize(500, 500);
frame.setLayout(new GridLayout(8, 8));

for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
squares[i][j] = new JPanel();

if ((i + j) % 2 == 0) {
squares[i][j].setBackground(Color.black);
} else {
squares[i][j].setBackground(Color.white);
}
frame.add(squares[i][j]);
}
}



frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}

public static void main(String[] args) {
new ChessBoard();
}
}