提交 97a22735 编写于 作者: 御承扬

Update

上级 396495bb
......@@ -2,8 +2,8 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="4e65795a-6659-4829-a5e6-120206826e71" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/AWT绘图/StrokeTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/AWT绘图/ColorTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/AWT绘图/ColorTest.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/AWT绘图/DrawStringTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list>
<list id="cbcb3066-613e-44bd-84c2-b0cf22cc5a78" name="New changelist" comment="New changelist" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
......@@ -130,7 +130,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="应用程序.StrokeTest">
<component name="RunManager" selected="应用程序.DrawStringTest">
<configuration name="ColorTest" type="Application" factoryName="应用程序" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="AWT绘图.ColorTest" />
<module name="IDEA_JAVA" />
......@@ -144,8 +144,8 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="DrawTest" type="Application" factoryName="应用程序" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="AWT绘图.DrawTest" />
<configuration name="DrawStringTest" type="Application" factoryName="应用程序" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="AWT绘图.DrawStringTest" />
<module name="IDEA_JAVA" />
<extension name="coverage">
<pattern>
......@@ -157,12 +157,12 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="JTableTest" type="Application" factoryName="应用程序" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="高级Swing组件.JTableTest" />
<configuration name="DrawTest" type="Application" factoryName="应用程序" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="AWT绘图.DrawTest" />
<module name="IDEA_JAVA" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="高级Swing组件.*" />
<option name="PATTERN" value="AWT绘图.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
......@@ -198,11 +198,11 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="应用程序.DrawStringTest" />
<item itemvalue="应用程序.StrokeTest" />
<item itemvalue="应用程序.ColorTest" />
<item itemvalue="应用程序.DrawTest" />
<item itemvalue="应用程序.TableModelTest" />
<item itemvalue="应用程序.JTableTest" />
</list>
</recent_temporary>
</component>
......@@ -320,14 +320,8 @@
<workItem from="1565656362641" duration="1123000" />
<workItem from="1565686873839" duration="81000" />
<workItem from="1565769172876" duration="227000" />
<workItem from="1565769434684" duration="2339000" />
</task>
<task id="LOCAL-00033" summary="Update">
<created>1561385104652</created>
<option name="number" value="00033" />
<option name="presentableId" value="LOCAL-00033" />
<option name="project" value="LOCAL" />
<updated>1561385104652</updated>
<workItem from="1565769434684" duration="2523000" />
<workItem from="1565856911163" duration="670000" />
</task>
<task id="LOCAL-00034" summary="Update">
<created>1561432271697</created>
......@@ -665,7 +659,14 @@
<option name="project" value="LOCAL" />
<updated>1565771939011</updated>
</task>
<option name="localTasksCounter" value="82" />
<task id="LOCAL-00082" summary="Update">
<created>1565772726248</created>
<option name="number" value="00082" />
<option name="presentableId" value="LOCAL-00082" />
<option name="project" value="LOCAL" />
<updated>1565772726248</updated>
</task>
<option name="localTasksCounter" value="83" />
<servers />
</component>
<component name="TodoView" selected-index="3">
......
// >= JDK 1.8
// encoding:utf-8
// @software:IntelliJ IDEA
// @user:彭友聪
// @date:2019/08/15
// @time:下午 4:18
// @project:IDEA_JAVA
// @file:DrawStringTest.java
// @Author:御承扬
//@E-mail:2923616405@qq.com
package AWT绘图;
import javax.swing.*;
import java.awt.*;
public class DrawStringTest extends JFrame {
static class CanvasTest extends Canvas {
CanvasTest() {
}
public final void paint(Graphics g){
super.paint( g );
Graphics2D g2 = (Graphics2D) g;
g2.setColor( Color.BLUE );
Font font = new Font( "楷体", Font.BOLD, 16 );
g2.setFont( font );
g2.drawString( "Done is better than perfect.", 20, 30 );
g2.drawString( "——比完美更重要是完成。", 60, 60 );
}
}
private DrawStringTest() {
this.setSize( 310, 140 );
setDefaultCloseOperation( WindowConstants.EXIT_ON_CLOSE );
add(new CanvasTest());
this.setTitle( "绘制文本" );
}
public static void main(String[] args) {
DrawStringTest frame = new DrawStringTest();
frame.setVisible( true );
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册