以下是画出哆啦a梦的代码

package com;import javax.swing.*;
import java.awt.*;public class dlam extends JFrame{public dlam() {this.setTitle("哆啦A梦");this.setVisible(true);this.setSize(370,460);}public void paint(Graphics graphics) {super.paint(graphics);graphics.setColor(Color.white);graphics.fillRect(0, 0, 370, 450);Color blue = new Color(0,100,255);graphics.setColor(blue);graphics.fillOval(65,60,240,230);graphics.fillRect(109, 290, 150, 120);int xValues[] = {109,70,63,109};int yValues[] = {290, 278, 308, 321};graphics.fillPolygon(xValues,yValues,4);int xValues2[] = {259,305, 295, 259};int yValues2[] = {290, 308, 332, 321};graphics.fillPolygon(xValues2,yValues2,4);graphics.setColor(Color.white);graphics.fillOval(41,271,40,40);graphics.fillOval(292, 305, 40, 40);graphics.fillOval(73, 402, 20, 20);graphics.fillOval(90, 405, 90, 25);graphics.fillOval(186, 405, 90, 25);graphics.setColor(Color.black);graphics.drawOval(41,271,40,40);graphics.drawOval(292, 305, 40, 40);graphics.drawOval(90, 405, 90, 35);graphics.drawOval(186, 405, 90, 35);graphics.setColor(Color.white);graphics.fillOval(85, 100, 200, 180);graphics.fillOval(123, 280, 120, 112);graphics.setColor(Color.red);graphics.fillRoundRect(103, 275, 166, 16, 15, 15);graphics.setColor(new Color(204,204,0));graphics.fillOval(169, 278, 30, 30);graphics.setColor(Color.black);graphics.drawLine(171, 285, 197, 285);graphics.drawLine(169,290,200, 290);graphics.fillOval(179, 293, 10, 10);graphics.drawLine(184, 300, 184, 307);graphics.drawArc(148, 290, 70, 70, 0, -180);graphics.drawLine(148, 325, 218, 325);graphics.setColor(Color.white);graphics.fillOval(123,  80, 60, 70);graphics.fillOval(183, 80, 60, 70);graphics.setColor(Color.black);graphics.drawOval(123,80,60,70);graphics.drawOval(183,80,60,70);graphics.fillOval(160, 108, 20 ,20);graphics.fillOval(186, 108, 20, 20);graphics.setColor(Color.white);graphics.fillOval(167, 114, 6 ,6);graphics.fillOval(190, 114, 6, 6);graphics.setColor(Color.red);graphics.fillOval(169, 158, 27, 27);graphics.setColor(Color.black);graphics.drawOval(169,158,27,27);graphics.setColor(Color.white);graphics.fillOval(184, 161, 10, 13);graphics.setColor(Color.black);graphics.drawArc(90, 60, 190, 190, -45,-90);graphics.drawLine(183, 185, 183, 250);graphics.drawLine(100,182,148, 189);graphics.drawLine(93, 200, 148, 200);graphics.drawLine(98, 217, 148, 211);graphics.drawLine(219, 189, 268, 182);graphics.drawLine(219,200, 272, 200);graphics.drawLine(219, 211, 269, 218);graphics.setFont(new Font("楷体",Font.PLAIN,24));}public static void main(String[] args) {dlam app = new dlam();app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);}
}

用java画哆啦a梦相关推荐

  1. java画哆啦A梦_java如何绘制哆啦A梦 java绘制哆啦A梦代码示例

    java如何绘制哆啦A梦?本篇文章小编给大家分享一下java绘制哆啦A梦代码示例,绘制的哆啦A梦超可爱,小编觉得挺不错的,现在分享给大家供大家参考,有需要的小伙伴们可以来看看. 以下是画出哆啦a梦的代 ...

  2. 用java画哆啦a梦,来画哆啦A梦吧!

    import turtle 创建哆啦A梦 doraemon = turtle.Turtle() doraemon.speed(10) def draw_eye_white_circle(x): dor ...

  3. 哆啦a梦简单图画python编程_[python]画哆啦A梦,Python,绘制

    from turtle import * #无轨迹跳跃 defmy_goto(x, y): penup() goto(x, y) pendown()#眼睛 defeyes(): fillcolor(& ...

  4. 多啦a梦的python代码_分享一篇文本文档画哆啦A梦代码!

    #encoding=utf-8 #Drawcat 画多啦A梦 from turtle import * # 无轨迹跳跃 def my_goto(x, y): penup() goto(x, y) pe ...

  5. MATLAB画哆啦A梦

    MATLAB画哆啦A梦 %===========================================% %--------------MATLAB绘制哆啦A梦-------------% ...

  6. 用Python画哆啦A梦

    from turtle import *# 无轨迹跳跃 def my_goto(x, y):penup()goto(x, y)pendown()# 眼睛 def eyes():fillcolor(&q ...

  7. 用python画哆啦a梦的头,用python画多来a梦-【Python】绘制哆啦A梦

    from turtle import * #无轨迹跳跃 defmy_goto(x, y): penup() goto(x, y) pendown()#眼睛 defeyes(): fillcolor(& ...

  8. Css3之画哆啦A梦

    最近学习完css3画图,然后就百度找了看有没有好的练手机会,看到别人博客上面有画哆啦A梦,还有小黄人,就自己看了哆啦A梦的来巩固下Css3的知识,先看看效果图 我们把这个图拆分开来,分为上下两部分,上 ...

  9. 用python画哆啦a梦的身体_每天一个Python小技巧,用Python 画个多啦A梦,小猪佩奇,文末还有Python入门学习视频...

    见网络上有人用Python 画出来个多啦A梦,很是新奇,来来来,我们看一下他们主要用到的库. 其实主要用的库就一个 turtle 库 先说明一下turtle绘图的基础知识: 1. 画布(canvas) ...

最新文章

  1. AD的PCB板设计中PCB板的开槽
  2. wpf combobox选择不显示_微软为Windows 10 on ARM引入WPF支持:提前防御苹果
  3. 不用copy代码--eclipse使用git提交项目-转
  4. Bitcoin 地址原理(2)私钥、公钥、地址基本概念
  5. getRemoteAddr()和getRemoteHost() 区别
  6. Faster R-CNN论文详解
  7. 怎样允许远程访问mysql_如何开启MySQL远程访问权限 允许远程连接
  8. mysql和web文件夹_Linux使用记录---自动备份MySQL和web文件夹到windows共享路径
  9. flutter SlideTransition实现平移动画
  10. Mybatis框架 导入/导出功能的实现
  11. centos+gitlab+mysql_centos7安装配置gitlab(使用外部nginx)
  12. phoshop cs6软件提示试用版已过期,怎么办
  13. Java基础篇:什么是线程优先级?
  14. 将 Entity Framework、LINQ 和 Model-First 用于 Oracle 数据库
  15. 广义线性模型(GLM, Generalized Linear Model)
  16. 如何防止SWF文件被反编译 如何防止SWF文件被反编译(2)
  17. Python一步实现静态图片动态化
  18. HTML谷歌怎么加背景音乐,谷歌Chrome浏览器怎么提取网页的背景音乐?
  19. 【ubuntu使用排坑】fsckd-cancel-msg:Press Ctrl+C to cancel all filesystem checks
  20. 精选101个中国风PPT模板

热门文章

  1. 使用AIR进行移动APP开发常见功能和问题(下)
  2. 雷神:音视频入门基础——000
  3. Linux 缘起无意
  4. Baumer工业相机堡盟工业相机如何通过BGAPISDK使用短曝光功能(C#)
  5. 2021年陕西商洛高考成绩查询,2021年陕西商洛各高中中考分数线及录取时间结果查询安排...
  6. java 裁剪网格纸_手工皮具纸模,怎么裁剪才漂亮?刀具裁切直线技巧分享!
  7. 计算机电脑的时区怎么弄,电脑的时间日期和时间怎么设置不了怎么办
  8. setTimeout与setTimeinterval的使用-2020年10月23日
  9. 敏捷是项目管理+合作
  10. java和kotlin哪个更值得学,Kotlin可以不学java吗