java.awt.TextArea - Customized
Hi,
i have been working on a java chat application. its working perfectly except for the fact that i need a customized text area to display messages in a formatted manner. Now i couldnt set font or color for any specific text because java.awt.TextArea doesnt support this. im not able to use swing (where this is possible) because it needs JRE1.3 in the client system.
What best could be done?
Thanks,
prasanna
I can understand your argument for not using Swing but the Java Plug-In can be seamlessly downloaded and installed along with your Applet code.
If you want to stick with the standard AWT then you could build your own TextArea using a Canvas component and basically paint the text when a keypress is detected. However, bear in mind that you will also have to handle cursor movement, page up / down, scrollbars, copy & paste etc.
Ronny.
The AWT package has been superseded by the Swing classes which address all of the AWT shortcomings but unfortunately the browser vendors were reluctant to include Swing in their JVM's.
Is it really essential to have color changing ability in the editing area itself ? You could use a normal TextField / TextArea for typing and (using a Canvas) change the colors / fonts based on each users settings.
Ronny.
HI,
im not talking about the editing area. i need to develop the component for the displaying area.
Actually, the chat room has an admin user. The admin user name and admin's message needs to be displayed in a different font color from the normal users.
Thanks,
prasanna
Hello ATMGUY,i have also tried searching the forums. i couldnt find any useful messages. also i went throu the sites u have mentioned, but i couldnt find any related info for the issue.Thanks for ur effortsprasanna