GRAPHICS AND MULTIMEDIA - Java Codes

Dynamic Icon

Description This code is an example of an Icon that changes form. Source Code import java.awt.BorderLayout; import java.awt.Component; import java.awt.Container; import java.awt.Graphics; import ja ...

0 Comments. 1072 views since Sep 3, 2008

Shadow Painting

Description This code shows how you can draw enhanced type of Drawings(which inludes Shadows as well) on your window. Source Code import java.awt.BasicStroke; import java.awt.Color; import java.awt.Fon ...

0 Comments. 1043 views since Sep 4, 2008

Rainbow Colour

Description This Code is a simple example of 2-D Graphics in Java with a simple combination of Colours. Source Code import java.awt.Graphics; import java.awt.event.WindowAdapter; import java.awt.event. ...

0 Comments. 1028 views since Aug 26, 2008

Move Shape with Mouse

Description This code demonstrates how you can move a image with the help of mouse on a window. Source Code import java.applet.Applet; import java.awt.*; import java.awt.event.*; import javax.swing.JAppl ...

0 Comments. 1017 views since Aug 4, 2008

Full Screen: Display Mode Test

Description This code generates a Table of all available Display Modes, enters Full-Screen Mode (if available) and allows you to change the display mode. The application should look fine under each enumerated Display Mode. Source Code ...

0 Comments. 1014 views since Sep 3, 2008

Rolling Text

Description This code draws a String along a Curve. Source Code import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.Shape; imp ...

0 Comments. 997 views since Sep 4, 2008

Colour Pallete

Description this color pallete demonstrate pallete working with four colors and by coloring both background and foreground Source Code import javax.swing.*; import java.awt.event.*; import java.awt.* ...

1 Comments. 994 views since Apr 5, 2009

Color Chooser: System Color

Description This is a code which chooses the color but it have another additional functionality of providing the System Colors viz. Windows Default Color, Control Shadow, etc. Source Code import java.awt ...

0 Comments. 982 views since Sep 9, 2008

Overlapping Colours

Description This Code is another good example for Graphics using Java where we have shown the use of colours on Panel. Source Code import java.awt.Color; import java.awt.Container; import java.awt.Grap ...

0 Comments. 975 views since Aug 26, 2008

Paint With Mouse

Description This is a simple code in java that shows the use of MouseMotion Event i.e how this event can be fired on your window by a simple example of paint brush Source Code import java.awt.Color; impo ...

0 Comments. 974 views since Aug 9, 2008

Shape & Color Editor

Description This is an applet which renders a Shape such as Rectangle,Ellipse,Text as selected by the user & also provides the user with the options of thickening & thinning the figure & painting the Shape with different Paints viz. Solid,Gradi ...

0 Comments. 973 views since Aug 21, 2008

Rectangles Using Mouse Drag

Description This is a code in java that implements mouse drag with a simple example of drawing rectangles in a window. Source Code import java.awt.BorderLayout; import java.awt.Canvas; import java.awt.Co ...

0 Comments. 971 views since Aug 10, 2008

Curve Drawer: Using two Points

Description This Code demonstrates how to Draw Curves using Graphics in Java.Here u can select two Co-ordinates on the Frame and then Draw Curve between those two Points with Co-ordinates being displayed on Status Bar. Source Code <p ...

0 Comments. 955 views since Aug 26, 2008

Enhanced Area Evaluation

Description This is another very good example of graphics as the above one with more evaluation and a complex figure. Source Code import java.awt.BasicStroke; import java.awt.BorderLayout; import jav ...

0 Comments. 946 views since Aug 25, 2008

Screen Capturing

Description This code shows how to take Screenshot of your Window. Source Code import java.awt.Dimension; import java.awt.Graphics; import java.awt.Rectangle; import java.awt.Robot; import java.awt.T ...

1 Comments. 945 views since Aug 30, 2008

Moving Icon

Description This is a code which displays a Button with Various Label Alignments. Source Code import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Container; ...

0 Comments. 939 views since Sep 4, 2008

Colored Box

Description This is a simple Box which shows a different pattern of colours in a Box. Source Code import java.awt.Color; import java.awt.Container; import java.awt.Graphics; import java.awt.GridLay ...

0 Comments. 926 views since Sep 13, 2008

Curve Creator

Description This Code shows how to draw a Curve using Java Graphics. Here in this example one can move Variable Points given to change the Shape of Curves. Source Code import java.awt.BorderLayout; impo ...

0 Comments. 922 views since Aug 26, 2008

MemImage

Description MemImage is an in-memory Icon showing a Color Gradient.Main program, showing two ways to use it. Create a small MemImage & set it as this Frame's IconImage. Also display a larger version of the same Image in the Frame. Source ...

0 Comments. 922 views since Sep 4, 2008

Colour Gradient

Description This Code shows the simple Window with the Colour Gradient which you often go through. Source Code import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.a ...

0 Comments. 921 views since Aug 26, 2008

Full Screen

Description This code shows how to set the Full Screen mode on your System. Source Code import java.awt.Color; import java.awt.DisplayMode; import java.awt.Frame; import java.awt.Graphics; import jav ...

0 Comments. 920 views since Sep 3, 2008

Rectangle Drawer

Description This code also draws a Rectangle but with pleasant Borders. Source Code import java.awt.BasicStroke; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import jav ...

0 Comments. 917 views since Sep 3, 2008

Custom Icon

Description This code shows how you can Customize Icon Settings according to you. Source Code import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Graphics; ...

0 Comments. 914 views since Sep 3, 2008

Animation

Description This code shows animation with the help of threading. Source Code import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Graphics; import java.awt.G ...

0 Comments. 899 views since Sep 10, 2008

Changing Colours

Description This is a code in java which shows a simple example of animation where colours of each block use to keep on changing themselves and also you can choose colours from the list Source Code impor ...

0 Comments. 893 views since Aug 23, 2008

LineMetrics: Text

Description This code shows the LineMetrics on the Text. Source Code import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints ...

0 Comments. 876 views since Sep 4, 2008

Color Chooser: Background Color

Description It is a code which chooses the Background Color. Source Code import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.GridLayout; import java.awt.ev ...

0 Comments. 864 views since Sep 9, 2008

Audio Clip Player

Description This is a code which demonstrates a File Browser for the Audio Files & also gives the additional functionality of Playing the Audio Clip. Source Code import java.applet.Applet; import java. ...

1 Comments. 855 views since Sep 17, 2008

Icon Interface

Description This code shows how you can attach an Icon with your Text. Source Code import java.awt.Color; import java.awt.Component; import java.awt.Graphics; import javax.swing.Icon; import javax. ...

0 Comments. 855 views since Sep 3, 2008

Full Screen: Capabilities Test

Description This code shows the different Buffering capabilities for each Graphics Configuration on each Graphics Device. Source Code import java.awt.BorderLayout; import java.awt.BufferCapabilities; ...

0 Comments. 841 views since Sep 3, 2008

Sound Player: Midi Format

Description This sound player application can increase the tempo of a song of file format of mid only. Source Code import java.io.*; import java.net.*; import java.awt.*; import java.awt.event.*; ...

0 Comments. 837 views since Sep 18, 2008

Enhanced Color Chooser: Background

Description This is a code for color choosing in which we can see the color we are choosing & can even preview the color without applying it. Source Code import java.awt.Color; import java.awt.Container ...

0 Comments. 829 views since Sep 9, 2008

Moving Colours

Description This code is another good example for animation.Here there is a oval shaped figure where the colours keep on moving. Source Code import java.awt.Color; import java.awt.Graphics; import java.a ...

0 Comments. 823 views since Aug 23, 2008

Texture Painting

Description This code shows a Pattern of drawing viz. Texture. Source Code import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rect ...

0 Comments. 807 views since Sep 4, 2008

Line Drawer

Description This code shows how to draw a Line on your Frame. Source Code import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rende ...

0 Comments. 805 views since Sep 3, 2008

Color Chooser: Foreground

Description This is a code which demonstrates how can we change the Foreground Color. Source Code import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.Font; ...

0 Comments. 797 views since Sep 9, 2008

Clip Area

Description This code shows how to clip a reigon here we have just shown it by printing the actions taking place during clipping by resizing the frame. Source Code import java.awt.Color; import java.aw ...

0 Comments. 797 views since Aug 25, 2008

Using Graphics with Mouse Event

Description This is a code in Java that shows the use of Event class along with graphics. Source Code import java.awt.*; import java.awt.event.*; import javax.swing.*; public class GraphicsEven ...

0 Comments. 786 views since Aug 3, 2008

Color Chooser: Background & Text

Description This is a code which demonstrates how can we change the color of the Background & the Text. Source Code import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; impo ...

0 Comments. 779 views since Sep 9, 2008

Full Screen: Multi Buffer test

Description This code takes a Number upto 13 as an Argument (assumes 2 by default) & creates a multiple Buffer strategy with the number of Buffers given.This application enters full-screen mode, if available, and flips back and forth between e ...

0 Comments. 742 views since Sep 3, 2008