"JAVA dynamic creation Feng Shui Compass Super Essence Swing Project Plan-project directory-Article 03"

Source: Internet
Author: User
  • JAVA dynamic creation of feng Shui Compass project Directory


Project deficiencies and deficiencies:
The Swing API draws images using the graphics drawing interface and special images, but graphics-drawn images appear jagged and irregular, so they are drawn using graphics2d. The Graphics2D class inherits the graphics class so it can be cast directly.

   1. Graphics 类提供的绘制方法大部分传的参数为int类型,绘制产生不精确.如果精度非常高建议不使用此类绘制,否则你知道效果,绘制出来的图形惨目忍睹,等分的数据产生明显的不等分.  2. Graphics2D 类提供的绘制方法比较好,一般提供int ,float, double类型的坐标参数,如果精度很高建议完全采用double数据进行计算和绘制,但是个别绘制只提供int坐标参数,是一大遗憾,同时swing 控件位置坐标只能以int为坐标,个别时候产生差异.

-

所以要获得非常高的精度,要么重写(工作量比较大),要么就退求其次. 如果用图形代替只需要用专业软件绘制精确界面就可以了,只能是非常简单的处理策略了.对于不求精确的项目或者编程人员来说可以略过了.曾听过一个人说过, 你做个的某个程序其实很简单没什么复杂的, 其实我要说的就是,不管什么程序或事情,可大可小,如果你把一个简单的程序做的非常灵巧,非常的有内涵那你就是这个程序或者这个行业的精英或者创建者.没有了解全貌只能算盲人摸象,个人腹言.看过哪些极具创意国外的程序,令人震惊和惊叹,可惜天国也许不需要如此而已吧!

-
The following chapters continue ...

"JAVA dynamic creation Feng Shui Compass Super Essence Swing Project Plan-project directory-Article 03"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.