我在想如果可以在applet上画线。我从外部来源加载小程序,但是我想绘制光标在屏幕上的行。使用paint或repaint方法在applet上画线JAVA
有人能告诉我我该怎么做吗?
下面是一个例子。
g.drawLine(mouse.getLocation().x - 6, mouse.getLocation().y,
mouse.getLocation().x + 6, mouse.getLocation().y);
g.drawLine(mouse.getLocation
().x, mouse.getLocation().y - 6,
mouse.getLocation().x, mouse.getLocation().y + 6);
1.使用JApplet 2.放置JPanel 3.覆盖JPanel的paintComponent,4.阅读[Oracle教程](http://docs.oracle.com/javase/tutorial/2d/index.html),5。阅读相关信息(右侧此网站,bellow carrers图标),6.如果没有成功,发布[SSCCE](http://sscce.org/) – mKorbel 2013-03-22 08:51:33
我似乎无法使用JApplet加载它。它不能被施放到JApplet显然 – user2059879 2013-03-22 09:35:11