java画哆啦A梦_java绘制哆啦A梦 超可爱
本文实例为大家分享了java绘制哆啦A梦的具体代码,供大家参考,具体内容如下
以下是画出哆啦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梦_java绘制哆啦A梦 超可爱相关推荐
- 用python画多来a梦-python 绘制哆啦A梦
[实例简介] 绘制哆啦A梦 [实例截图] [核心代码] #!/usr/bin/python # -*- coding: UTF-8 -*- # 哆啦A梦 import turtle def flyTo ...
- python画图哆啦a梦-python 绘制哆啦A梦
[实例简介] 绘制哆啦A梦 [实例截图] [核心代码] #!/usr/bin/python # -*- coding: UTF-8 -*- # 哆啦A梦 import turtle def flyTo ...
- 如何用手机HTML制作哆啦a梦,CSS3绘制哆啦A梦(带鼠标动画)
body{ margin: 0; background: lightblue; } /*哆啦A梦*/ .doa{ position: relative; top: 100px; } .head{ ma ...
- java画乌龟动起来_java用swing画可以行走的乌龟
代码如下: import java.awt.Color; import java.awt.Graphics; import java.awt.event.KeyEvent; import java.a ...
- java画一张笑脸_java swing应用(1):画一个眨眼珠的笑脸
import java.awt.*; import javax.swing.*; public class GuiDemo1{ boolean flag = true; public static v ...
- Java根据表格生成图_java绘制数据表格并导出为图片格式
/*** @Description : 导出图片 *@param: * *@return: * 2020-04-23*/ public void actionExportReport(HttpServ ...
- 用java画熊猫_熊猫:绘制正在运行的项目
您可以使用 range 和join创建新系列到原始 df : s = (df.apply(lambda x: pd.Series(range(x['Start'], x['End'] + 1)), 1 ...
- java画哆啦A梦_java如何绘制哆啦A梦 java绘制哆啦A梦代码示例
java如何绘制哆啦A梦?本篇文章小编给大家分享一下java绘制哆啦A梦代码示例,绘制的哆啦A梦超可爱,小编觉得挺不错的,现在分享给大家供大家参考,有需要的小伙伴们可以来看看. 以下是画出哆啦a梦的代 ...
- 用python画多来a梦-使用Python的Turtle绘制哆啦A梦实例
这是我几年前为了练习python的turtle库而画的,今天翻出了代码,分享给大家. 这是我初学python时画的,当时还没有面向对象的概念,也没有采取类方法之类,纯原始手工,供大家参考. 若有兴趣可 ...
- python画图哆啦a梦-使用Python的Turtle绘制哆啦A梦实例
这是我几年前为了练习python的turtle库而画的,今天翻出了代码,分享给大家. 这是我初学python时画的,当时还没有面向对象的概念,也没有采取类方法之类,纯原始手工,供大家参考. 若有兴趣可 ...
最新文章
- 用Transformer实现OCR字符识别!
- 树莓内核驱动io框架
- 《因果学习周刊》第6期:因果推荐系统
- PAT_B_1086_Java(15分)
- Windows10 bash 巨硬和Canonical Ltd.的PY交易
- 【Linux】Centos7重启网卡失败
- The path ‘E:\ZERO‘ does not belong to a directory.
- Java-重载、重写(冷静分析)
- lg linux电视安装软件,LG电视如何安装第三方应用软件的方法教程
- 紧贴“十四五”规划 天威诚信强势助力政务信息化系统建设
- 如何制作微软原版Win10安装盘
- python爬虫公众号音频源代码_python爬取音频下载的示例代码
- 爬取抖音数据实践方案《进阶版》
- cocos2d-x 音乐音效
- 治愈系英语笔记-2-一般、否定疑问句,现表将来
- 微信发单机器人_微信多客服系统SDK通信接口
- win rar如何注册破解
- 数据结构课设 - 平衡二叉树的演示
- 2018年计算机学校迎新标语,2018年大学迎新标语
- linux显示文件的第一行数据库,Linux练习题
热门文章
- 演讲实录 :某大型股份制商业银行的容器化探索之路
- 方法调用错误,例如:
- 网络新文化现象:newbilitynbsp;(不代表…
- GO语言-panic和recover
- 友善之臂最新版mini2440学习笔记——u-boot 1.1.6移植(一)
- 【TFLearn和TensorFlow应用】——泰坦尼克号预测
- AppleScript(0) : 文档与语法
- 阿里云服务器续费坑啊早知道不买了
- wex5 mysql服务器_将WeX5部署到自己的Tomcat服务器上
- Altium Designer 18 生成网络表