Wednesday, December 15, 2010

JAVA : Font Formatter

JAVA Font Formatter

Font Formatter is a Java application that allows user to manipulate font in different ways like font type, font size, and font style. This Font Formatter Java application shows the use of font utility that can be used in many other programs.

!!!!!!!!!!....Applet may take some time to load....!!!!!!!!!!
1.) Select the type of font from the options in combo box.
2.) Select the size of font form the second combo box.
3.) Check or uncheck the Bold or Italic check box to change the style of font.
4.) Press Quit Button to Quit.

Available fonts:
To get the available fonts list in Java a toolkit object is used. A toolkit object contains the list of the available fonts which can be fetched using a in build method.

                String[ ] fontList;
fontList = Toolkit.getDefaultToolkit().getFontList();

In this program a createFontChoice() function is written for making a combo box list of available fonts.

    private void createFontChoice() {

String[] fontList;
fontList = Toolkit.getDefaultToolkit().getFontList();
for(int i=0; i<fontlist.length; i++){
              fontName = fontList[0];

Download Files Here:

Wednesday, December 1, 2010

JAVA : Paint Application

JAVA Paint Application

Java Paint application is a simple applet implementation of MS paint like application implemented in Java written by Java Code Spot which allows user to draw different shapes and basic drawing. It has the basic drawing tools such as point, line, rectangles, round rectangles and circles and color manipulation options, other than that it has eraser tool. Paint application is a good example of how to use java's graphics libraries.

!!!!!!!!!!....Applet may take some time to load....!!!!!!!!!!

1)Select the drawing tool from the combo box.
2)Check draw or fill option to choose how to draw.
3)Check eraser option for using eraser tool.
4)Choose color of drawing from color combo box.
5)Press 'z' for undo.

Download Files Here: