当前位置: 首页 > 工具软件 > CurvedText > 使用案例 >

Java绘制文字_Java 绘制环形的文字 (Circle Text Demo)详解

丁德义
2023-12-01

CircleTextDemo.java

import java.awt.*;

import java.awt.event.*;

import java.awt.geom.*;

/**

* A demo class that illustrates drawing text

* along the outside of a circle.

*/

public class CircleTextDemo extends Canvas {

Frame myframe;

TextField text;

Button printBtn;

Font myfont;

Color textcolor;

Color circlecolor;

/**

* Create a CircleTextDemo canvas and frame

* with default settings.

*/

public CircleTextDemo() {

this("Serif", Font.PLAIN, 18, Color.pink, Color.black);

}

/**

* Create a CircleTextDemo canvas and frame

* with supplied settings.

*

* @param ff Font family (usually "Serif")

* @param fs Font style (usually Font.PLAIN)

* @param fz Font size (usually 18)

 类似资料: