请问java画图的问题,我画了直线怎么用语句加粗啊???
packageorg.awt;importjava.awt.*;importjava.awt.event.*;publicclassAstonextendsFrame{p...
package org.awt;
import java.awt.*;
import java.awt.event.*;
public class Aston extends Frame{
public static void main(String[] args){
Frame fr = new Aston();
fr.addWindowListener(new windowhandle());
}
Aston(){
setSize(1000,600);
setVisible(true);
}
public void paint(Graphics g) {
g.setColor(Color.pink);
g.drawRect(400,200,200,35);
g.fillRect(400,200,200,35);
g.setColor(Color.red);
g.drawLine(475,200,465,180);
}
}
class windowhandle extends WindowAdapter{
public void windowClosing(WindowEvent e){
System.exit(-1);
}
}这是我的程序的一部分,请问怎么把线条加粗,java老师布置的作业画车标,我画阿斯顿马丁,线条太多?? 展开
import java.awt.*;
import java.awt.event.*;
public class Aston extends Frame{
public static void main(String[] args){
Frame fr = new Aston();
fr.addWindowListener(new windowhandle());
}
Aston(){
setSize(1000,600);
setVisible(true);
}
public void paint(Graphics g) {
g.setColor(Color.pink);
g.drawRect(400,200,200,35);
g.fillRect(400,200,200,35);
g.setColor(Color.red);
g.drawLine(475,200,465,180);
}
}
class windowhandle extends WindowAdapter{
public void windowClosing(WindowEvent e){
System.exit(-1);
}
}这是我的程序的一部分,请问怎么把线条加粗,java老师布置的作业画车标,我画阿斯顿马丁,线条太多?? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询