
[英]How to use two paint methods in java? Or outside the basic paint method
[英]How to make a method from outside of the paint method and then call it in paint?
public class window extends JPanel{
public void paint(){
//draw stuff
}
}
//In another file
public class Hero{
public void draw(){
//i want to draw the hero using fillRect or other stuff
}
}
这是如何完成的(如果可能的话)?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.