Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: How to fade out an image

import java.awt.AlphaComposite;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.event.ActionEvent;
impor

Java: How to draw a circular Arc2D

 import java.awt.*;
 import java.awt.geom.*;
 import  javax.swing.*;
 class ArcCirculaire extends JFrame {
	public ArcCirculaire()
	{
	setTitle("Java

Java: Draw rectangle, ovale and line

   import java.awt.Color;
   import java.awt.Graphics;
   import javax.swing.*;
   public class GEOGraph extends JPanel
   {
    public void paintComp

Java: How to draw Polyline and Polygone

   import java.awt.Graphics;
   import java.awt.Polygon;
   import javax.swing.*;
   public class GEOPoly extends JPanel
   {
    public void paint

Java: Font size animation example

import java.awt.Color;
import java.awt.Font;
import javax.swing.*;
public class Marqee extends JPanel implements Runnable
{
  JLabel label;
  String

Java: How to change the attributes (color and font) of a portion of text using ‘AttributedString’ class

  import java.awt.*;
  import java.awt.font.TextAttribute;
  import java.text.*;
  import javax.swing.*;
/*
 *  Draw text and change 
 *  its font an

Java: Draw Texts on swing composant

import java.awt.*; 
public class DrawText extends Component { 
    public void paint(Graphics g)
    {
        // Draw your text here
        g.drawS

Java: Example of an underline and strikethrough text

  import java.awt.*;
  import java.awt.font.TextAttribute;
  import java.text.*;
  import javax.swing.*;
  public class AttributText
		{
		 public st

Java: Modify the characteristics of a shape using ‘Strok’ class

 import java.awt.*;
 import java.awt.geom.*;
 import javax.swing.*;
/*
 * This example draws a 
 * square and modifies its features
 */
 public class