如何从消息文本框中获取文本?
我正在 Netbeans 中开发移动应用程序,对于我的应用程序,我必须从写入消息框中获取文本,但我不知道如何从 Netbeans 的 SMS Composer 组件的消息标签中获取文本?请帮我..
I'm developing mobile application in netbeans and for my application i have to get text from write message box, but i don't know how to get text from message label of sms composer component of netbeans? please help me..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无法从类外部访问
SMSComposer
类中的私有变量message
,这违背了 java OOPS 概念。您可能希望 Java ME 支持反射,但请放心,它不受支持。因此,解决您的问题的另一种方法是重新创建一个类似于 netbeans
SMSComposer
类的类,并按照您喜欢的方式使用它。您可能想浏览一下这些站点
There is no way to gain access to private variable
message
in the classSMSComposer
from outside of the class, it just defeats the java OOPS concepts. You might be wishing for Reflection support in Java ME but rest assure its NOT supported.So another approach to your problem would be to recreate a class similar to netbeans
SMSComposer
class and use it the way you like.You might want to glance through these sites