mlsb.net
当前位置:首页 >> jAvA 绘制 >>

jAvA 绘制

package math; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.GridLayout; import java.awt.Toolkit; import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JComboBox; import javax....

java 输出菱形代码: package demo;public class Demo01 {public static void main(String[] args) {int i, j, k;for (i = 1; i

import java.awt.*; import javax.swing.*; public class DrawRectTest extends JFrame { //定义方法 public DrawRectTest() { //实例化对象 GPanel g=new GPanel(); this.getContentPane().add(g); this.setSize(500,500); this.setVisible(tru...

package test; import java.awt.Canvas; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Toolkit; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JFrame; import javax...

可以用FLASH实现 i = 0; _root.createEmptyMovieClip("mc", 5); _root.createTextField("txt1", 6, 100, 200, 100, 20); _root.createTextField("txt2", 7, 460, 200, 100, 20); txt1.text = "(0, 0)"; txt1.selectable = false; txt2.text = "(...

在paint(Graphics g){ super.paint(g); //然后什么也不做,return }

import java.awt.*;class MyCanvas extends Canvas{ public void paint(Graphics g){ g.setFont(new Font("华文行楷",Font.PLAIN,20)); g.setColor(Color.RED); g.drawString("绘图测试!",20,20); g.drawLine(30,60,100,60); g.setColor(Color.B...

//1.在内存中创建图片 BufferedImage i = new BufferedImage(100, 20, BufferedImage.TYPE_INT_RGB); //2.得到画笔 Graphics g = i.getGraphics(); g.drawOval(x, y, width, height);

public void paintComponent(Graphics g){ super.paintComponent(g); Graphcis2D g2d = (Graphics2D)g; g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.setStroke(new BasicStroke(2f)); g.setPai...

package test;import java.awt.event.*;import java.awt.*;public class Mains extends Frame {public Mains(String title){super(title);}public static void main(String[] args) {Mains f = new Mains("Frame");f.setSize(300, 300);f.addMou...

网站首页 | 网站地图
All rights reserved Powered by www.mlsb.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com