在JFrame上打印文本的问题 [英] problem with printing text on a JFrame

查看:80
本文介绍了在JFrame上打印文本的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在JFrame上打印文本时遇到了很大的问题。这是一个简单的白板我正在做但我似乎无法正确打印文本。它打印同一点上的所有字母(所有字母都堆叠在一起),而不是像这是一个随机字符串那样逐步打印它。任何人都可以帮助我???


这是我到目前为止所拥有的:

Hi, im having a major problem with printing text on a JFrame. This is a simple whiteboard I''m doing but i just cannot seem to print the text properly. It prints all the alphabets on the same point (all the alphabets are piled on top of each other) instead of printing it incrementally like "this is a random string". Can anyone please help me???

Here''s what I have so far:

展开 | 选择 | Wrap | 行号

推荐答案


您好,我在JFrame上打印文本时遇到了严重问题。这是一个简单的白板我正在做但我似乎无法正确打印文本。它打印同一点上的所有字母(所有字母都堆叠在一起),而不是像这是一个随机字符串那样逐步打印它。任何人都可以帮助我???


这是我到目前为止所拥有的:

Hi, im having a major problem with printing text on a JFrame. This is a simple whiteboard I''m doing but i just cannot seem to print the text properly. It prints all the alphabets on the same point (all the alphabets are piled on top of each other) instead of printing it incrementally like "this is a random string". Can anyone please help me???

Here''s what I have so far:

展开 | 选择 | Wrap | 行号


调用keyDown方法时是否初始化了fm?
Is your fm initialised when the keyDown method is called?


是的,它已经被初始化了。我只是似乎没有代码的问题,我真的不知道为什么它不起作用。
Yes it has already been initialized. I just dont seem to the a problem with the codes and I really have not a clue why it doesnt work.


这篇关于在JFrame上打印文本的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆