How to create a file in Java

The creation and utilization of a disk file involve various decisions to be made, such as an appropriate naming for the file, data type to be used, purpose of creating the file and method used in the creation of file.A Filename refers to a unique string of characters that facilitates easy identification of files on the disk.

 

RandomAccessFile in Java

Random Access File means that the data can be read from or written to random location in a file. In the File class, data is read from and written sequentially as continuous streams of data. The java.io package comprises a class known as RandomAccessFile that allows performing input/ output operations to any location within a file.

 

Applet for add two numbers

Applets are simple Java programs that runs in web browsers.The creation of web pages is related to Java Applet. An applet is an Internet based Java program that can be included in an HTML page.An applet is a Java class defined in JDK’s java. applet package.

Program in C to calculate length of a String

The strlen() function, find the length of a string. This fuction counts the number of characters presents in a string. String.h has to be included in the program before you call the strlen().

String constants vs char arrays in C

A string constant is a series of characters(array of characters or group of characters) enclosed with double quotes(like “GOOD “).A string constant is a one dimensional(str11[]) array of characters. A character constant is a character enclosed in single quotes.(like ‘G ‘). Each character in a string takes only 1 byte.

Change background color of JTable column in Java

Table is the Combination of rows and columns. With the help of Table we can display the data. A software application with a colorless screen interface would be dull and lifeless. Adding colour to it more attractive and captivating. The java.awt.Color class is used to add color to the applications and applets.

How to Use the ButtonGroup Component in Java

JButton Group component is used to manage the Buttons. By using JButtonGroup we can select only one option at a time.Controls are components like Buttons, textboxes that can be added to container like frames,panels etc.

Changing the Column name in JTable

The JTable class is a component of Swing programming which presents the user data within a scrolltable.Changing the name of the Column in JTable we use the method ChangeName().

Draw Shapes using C Graphics

By using Graphics we can draw the geometric figures like circle, line, ellipse, bar etc.

In this we set the coordinates like leftt,top,right,bottomm.Graphics.h library is used for graphics (initgraph method).

 

JLabel in Java Swing

As frame, panels, and applets are Swing components, similarly labels are also Swing components. The idea behind using JLabel is to display an area for a short text string or an image, or both. Labels do not respond to input events;hence, JLabel does not receive the keyboard focus. The label can be aligned by setting the label’s contents using the vertical and horizontal alignment.

Page 14 of 29

About Us

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