b*i
5 楼
多谢啊,还是这个问题。同样的字符在notepad下可以上下联一起,但是word里就不能
。估计行间距java不能调。
我决定使用图形了。我把图形作为背景,放在jTextArea里面。但是遇到了闪烁问题。
MyTextArea extends JTextArea
paint(Graphics g)
{
g.drawImage...
super.paint(g);
g.finalize();
}
然后在主程序每次作图修改image后
theTextArea.repaint(g);
结果,每次都看到这个区域白光闪过。倒是更新了,但是我不希望出现这个白光闪烁。
怎么去掉呢?目的就是在text内容没有变,但是背景image变了后,能够更新图像,但
是不想有闪烁。
【在 h*****0 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 那你得去找字符“|”
: 注意,是有这么个专门的制表符,不是键盘上的那个符号。BBS Telnet模式下就常用。
。估计行间距java不能调。
我决定使用图形了。我把图形作为背景,放在jTextArea里面。但是遇到了闪烁问题。
MyTextArea extends JTextArea
paint(Graphics g)
{
g.drawImage...
super.paint(g);
g.finalize();
}
然后在主程序每次作图修改image后
theTextArea.repaint(g);
结果,每次都看到这个区域白光闪过。倒是更新了,但是我不希望出现这个白光闪烁。
怎么去掉呢?目的就是在text内容没有变,但是背景image变了后,能够更新图像,但
是不想有闪烁。
【在 h*****0 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 那你得去找字符“|”
: 注意,是有这么个专门的制表符,不是键盘上的那个符号。BBS Telnet模式下就常用。
c*t
6 楼
1. flashing is because of clearing the background to white.
2. For JComponents (i.e. JTextArea), you really should override
paintComponent
function instead of paint (which is for heavyweight components).
3. If you were to override paint function, do not call super.paint.
4. Turn on double buffering.
5. Should not call g.finalize
【在 b***i 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 多谢啊,还是这个问题。同样的字符在notepad下可以上下联一起,但是word里就不能
: 。估计行间距java不能调。
: 我决定使用图形了。我把图形作为背景,放在jTextArea里面。但是遇到了闪烁问题。
: MyTextArea extends JTextArea
: paint(Graphics g)
: {
: g.drawImage...
: super.paint(g);
: g.finalize();
: }
2. For JComponents (i.e. JTextArea), you really should override
paintComponent
function instead of paint (which is for heavyweight components).
3. If you were to override paint function, do not call super.paint.
4. Turn on double buffering.
5. Should not call g.finalize
【在 b***i 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 多谢啊,还是这个问题。同样的字符在notepad下可以上下联一起,但是word里就不能
: 。估计行间距java不能调。
: 我决定使用图形了。我把图形作为背景,放在jTextArea里面。但是遇到了闪烁问题。
: MyTextArea extends JTextArea
: paint(Graphics g)
: {
: g.drawImage...
: super.paint(g);
: g.finalize();
: }
相关阅读
JBuilder 9.0 Downloadjava 的资格认证考试how to multicast objects to clients in java?还是 JAVA 好啊TextComponenthelp for appletviewer![转载] Re: 拜托大家,帮我看看是怎么回事SunONE Studio5哪里下载JBuilder8或9完全版?[转载] 请问如何改变Oracle 9i AS中JVM的default encodingAnt problem求SCWCD复习资料!Re: Ask a Q: where did the name Tomcat cweb服务器与客户端双向认证SUN Java 1.4.2安装JAVA中的问题?Local file access issue with Applethow to get punctuations in Chinese files.[Share] Java ScreenShot Applicationjava image processing problem