Someone has a Java applet to be transplanted to android for running. It is said that android is Java.
However, after setting up the environment and importing the code, we found that a large number of drawing code on awt could not be compiled.
The first thought is to modify the code and use android. graphics to replace those calls of awt. This is a mechanical thing.
Then I came up with an idea. Why do I not use android. graphics in android to implement the basic functions of awt? This greatly simplifies the porting.
The following class needs to be implemented:
Color Font FontMetrics Graphics Rectangle
However, with the attempt, we found that the following class also needs to be implemented:
BasicStroke Graphics2D Stroke GradientPaint RoundRectangle2D MenuItem PopupMenu
Things are getting more and more complex. Is this a feasible path? The study is in progress. If you are familiar with porting Java to android, please kindly advise.