Java Applet and Displaying text
I’m having various problems with the graphic printing features for applets.
In this immediate applet, when I print and update the previous line bleeds through the next line. I tried printing a series of spaces to clear the first text, but it doesn’t work. Can someone provide some tips on resolving this issue? Code:
import java.awt.Graphics; -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
could you provide the output screen
|
Quote:
http://image.apollo3.com/image/gen/1...playOutput.jpg -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
is this line correct
Quote:
Quote:
|
Quote:
I have since tested the message sample. It's running with the "," in the picture I outputted to you. It won't compile without the proper syntax. The image I linked is the one with the comma... the proper syntax. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
I am very busy but I will tell u a little hint
spaces did not remove the words why don't u search a character that looks like a white box?? search in the asci characters for that |
Quote:
Another problem with the code is that paint() is the wrong place for the ip checking code: paint() is called by the system whenever the screen needs to be drawn, so just covering and uncovering the window would cause the ip to checked again. |
Quote:
Code:
g.clearRect(1, 1, 100, 20); I'll look for a character that will do what you say and compare which would be more efficient. I searched hard to find examples of reprinting but couldn't. By the way, it's not very clean to have to have all my code embeded in the "public void paint(Graphics g)" block just to print. At present I'm very restricted become of of my could will error when trying to contain it in that box. I'm still trying to figure out a clean way to work outside that "public void paint(Graphics g)" block, but have to do with this workaround for now. I tried: Code:
import java.awt.*; Quote:
You're right. The clearRect does better. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
Quote:
The problem is very apparent when you look at http://faq.apollo3.com/ljames/fsinn/...testservers.pl . I'm trying to use some variation of the "HelloWorld" and the "theApplet" examples you gave in the thread about output. However, they are so dependent on the other classes that are included in the codes that they fail to work without including the other classes. Dissecting the other classes and retaining functionality is one of my immediate projects. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
All times are GMT -5. The time now is 08:37 PM. |