黑莓 Hello World 程序

发布于 2024-12-08 03:33:43 字数 165 浏览 0 评论 0 原文

我正在学习黑莓编程。 我使用 Black Berry 的 eclipse 插件编写了一个程序“Hello World”。 然后我想使用 Run As 中的 Black Simulator 来运行程序 -->黑莓模拟器。 出现一个空白窗口。我尝试加载 .cob 文件,但仍然无法正常工作。 任何人都可以帮助我吗?

I am learning Black berry programming.
I have written a program "Hello World" using the eclipse plug in for Black Berry.
Then I want to run the program using the Black Simulator from Run As --> Black Berry Simulator.
A blank window is appeared. I tried to Load .cob file, still it is not working.
Can any body please help me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ゝ偶尔ゞ 2024-12-15 03:33:43

我认为您没有在主屏幕中添加 labelField (带有 helloworld 文本)。
否则,您的 labelfield 前景色与屏幕颜色相同。
只需尝试覆盖 LabelField 的 pain() 即可。
例如:-

 labelField= new LabelField("HelloWorld")
 {
     protected void paint(Graphics graphics)
     {
          graphics.setColor(Color.RED);
          super.paint(graphics);
     };
 };

试试这个;我想这应该对你有帮助。

I think you didn't add the labelField (With helloworld text) in MainScreen.
Otherwise, your labelfield foreground color is the same as screen color.
Just try to override the pain() of the LabelField.
eg:-

 labelField= new LabelField("HelloWorld")
 {
     protected void paint(Graphics graphics)
     {
          graphics.setColor(Color.RED);
          super.paint(graphics);
     };
 };

Try this; I think this should help you.

坏尐絯 2024-12-15 03:33:43

这是一个很难正确回答的问题,因为有很多变量,例如您的操作系统、“空白窗口”的确切含义、您在教程中可能已正确完成或未正确完成的步骤。

如果您使用的是 Windows 计算机,则不必尝试自己安装 eclipse 插件,下载并运行 预装 eclipse 捆绑包

接下来,我建议你回到HelloWorld教程,从头开始。仔细检查您的每个步骤并花些时间以便您完全理解您的每个步骤。如果您到达本教程中无法完成的部分,那么您应该在这个问题中提出确切的部分。

但是也! (这是成为像我这样的成功程序员必须学习的最重要的事情之一)当你提出问题时,不要假设人们了解你的设置、编码或任何变量。设身处地为回答者着想,考虑他们需要知道什么才能做到这一点。这是一个非常基本的事情,它甚至应该成为每个 HelloWorld 教程的一部分。

This is a very difficult question to answer correctly because there are many variables such as your OS, what exactly you mean by "blank window", the steps you may or may not have completed correctly in your tutorial.

If you are using a Windows machine, instead of trying to install the eclipse plugin yourself it might be easier for you to download and run the pre-installed eclipse bundle provided by RIM.

Next, I suggest you go back to the HelloWorld, tutorial, start from scratch. Double check each of your steps and take your time so you fully understand each of your steps. If you reach a part of the tutorial that you cannot complete then you should raise the exact part in this question.

But also! (And this is one of the most important things you must learn to become a successful programmer like me) Do not assume people have knowledge of your setup, your coding, or any variable when you ask a question. Put yourself in the shoes of the person answering it and consider what they would need to know in order to do so. This is such a fundamental thing that it should perhaps even be part of every HelloWorld tutorial.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文