English 中文(简体)
Java改为安乐团
原标题:Java to Android conversion problems

我有一部相当复杂的 Java(JDK 6)法,需要转换,以便在安康开展工作。 该《 Java法》旨在与图象相配合:因此,有一门延伸JLabel(缝).部件)、“PaintComponent”方法重塑,使JLabel(`cuts')能够像一个圈子一样观看,并用屏幕(我知道,我知道——即可能使用“drawCircle”方法,但需要扩大JLabel,因为它有一部分人。

现在,一只存在问题——似乎没有“等级”类型、“职业”类型、“弹性”类型、“责任”方法,而且毕竟没有设想什么控制应当用来根据(在JDK 6中,即使用JPanel作为定制的JLabels的集装箱)。

请帮助! 我需要就如何将贾瓦逻辑转换成安康逻辑的最痛苦方法提出一些建议?

最佳回答

rel=“nofollow”>Graphics ,用于绘画。

Have a look at Shape Drawable which should assist you in drawing rectangles. Instead of JLabel use TextView. You will have to spend some time in getting to know Android and redrawing your GUI, but I hope I provided some good starting points.
Also note that depending on complexity of your code, you may not be able to use all your Java code, becase Android doesn t provide full Java version.

问题回答

AFAIK Android doesn t support Swing, so you re going to have to use equivalent Android UI classes. The android UI classes are not a 1-to-1 match with Swing classes, so sometimes an Android port means you need to do a pretty heavy UI rewrite.

安德列斯没有JLabel,因此你不能使用该法典。

相反使用案文。 您可在Xml或java法典中宣布案文。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签