Download Ip Book for Class Xii - Cbse PDF

TitleIp Book for Class Xii - Cbse
File Size15.9 MB
Total Pages381
Table of Contents
                            1 IP INTIAL PAGES.pdf
CHAPTER 1-3 INFORMATIC PRACTICES XII WEB
CHAPTER 4-6 INFORMATIC PRACTICES XII WEB
CHAPTER 7-8 INFORMATIC PRACTICES XII WEB
CHAPTER 9-11 INFORMATIC PRACTICES XII WEB
                        
Document Text Contents
Page 1

INFORMATICS
PRACTICES

A Text Book on

Shiksha Kendra, 2, Community Centre,
Preet Vihar, Delhi-110 092 India

CLASS XII

Page 2

A text book on Informatics Practices, Class XII.

PRICE : Rs.

FIRST EDITION 2011 © CBSE, India

COPIES:

PUBLISHED BY : The Secretary, Central Board of Secondary Education,
Shiksha Kendra, 2, Community Centre, Preet Vihar, Delhi-110092

DESIGN, LAYOUT : Multi Graphics, 5745/81, Reghar Pura, Karol Bagh,

New Delhi-110005, Phone : 25783846

PRINTED BY :

"This book or part thereof may not be reproduced by
any person or agency in any manner ."

Page 190

182

DATABASE CONNECTIVITY

while(rs.next())

{

String Name = rs.getString("Name");

String Mobile = rs.getString("Mobile");

String Email = rs.getString("Email");

model.addRow (new Object[] {Name, Mobile,Email});

}

Till there are records in the database, keep retrieving the values of Name,

Mobile and Email from the table one by one using the getString() method and

store them in the three String variables using the assignment operator.

After storing the values in the variables, display these values in the table

component on the form using the addRow() method.

int rows=model.getRowCount();

Declare a variable named rows of type integer and initialize it with the total

number of rows in the table component of the form using the getRowCount()

method.

if (rows>0)

{

for (int i=0; i<rows; i++)

model.removeRow(0);

}

If the number of rows is greater than zero, then use a for loop to reset the table

component i.e. delete all the rows using the removeRow() method. Note that

the parameter passed to the removeRow() method is always zero as we are

always deleting the topmost row and this process is repeated rows number of

times to ensure that all the rows are deleted.









Page 191

183

DATABASE CONNECTIVITY

Data Connectivity Application 5: To Add Records in a Table Accepted Through a Form

with Hindi Interface

Now that we are clear about data connectivity, let us learn a new feature - to add

multilingual support facility to our Netbeans form and database and then display records

in our native language as shown in Figure 6.23.

Figure 6.23 Form Design of the Contact List Application with a Hindi Interface

First create a database named CBSEHINDI using the following command:

CREATE DATABASE CBSEHINDI DEFAULT CHARACTER SET UTF8;

Note that the DEFAULT CHARACTER SET UTF8 has been added to the above command to

have Unicode support for entering and processing data in HINDI language. Adding this

command while creating the database ensures that all tables created within this

database support Hindi language processing.

Next create a table named Contact in the CBSEHINDI database using the following

command:

CREATE TABLE Contact (Name VARCHAR(20),Mobile VARCHAR(12),

Email VARCHAR(25));

Now while creating the form as shown above for the Netbeans application, remember to

use unicode supported fonts for jTextFields, jLabels and jButtons (such as Arial Unicode

MS) as shown in Figure 6.24.

Page 380

372

APPENDIX-II

Step 3: The language bar will now show the current language.

Step 4: You can now start typing in English and whatever you type automatically gets

transliterated after a word-breaking character like a space, comma, etc. is

entered. Note that this language setting is per application. You may have to

repeat the steps above for each application you want to use Microsoft ILIT in.

The Microsoft indic input tool comes with a virtual keyboard that can be used to

type in notepad.

Figure 5 Virtual Hindi Keyboard

Note: You can switch between different languages by clicking on the language bar and

changing the language or by pressing the left ALT+SHIFT keys.

Page 381

373

APPENDIX-II

Installing Fonts in Windows :

Step 1: Go to Windows Fonts folder e.g. C:\Windows\Fonts. (The path may differ on

some computers.)

Step 2: Copy-paste the font file into this folder. Windows will now install the font file.

Step 3: Once installed the font will be available in your text-based applications.



1. http://www.microsoft.com/windowsxp/using/setup/winxp/

yourlanguage.mspx

2. http://office.microsoft.com/en-us/support/enable-keyboard-layouts-for-

different-languages-HA010354267.aspx

Source:

Similer Documents