[java] textarea
Im trying to create a java applet to serve as the client to a program I am making. I want to be able to do like Yahoo and other chat places do their text. It looks to me like they place their text inside a textarea, but how do they get other attributes? for example, choosing different fonts, and different colors, and font sizes, background, pictures, etc. How could I create a similar "textarea" for use in my project.
http://fakemind.com
I think this is a job for styled documents.
http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html
I''ve never actually done anything with them but I think that''s what you need. There is an example that comes with the jdk in which you can change the font and color of text, and insert images.
http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html
I''ve never actually done anything with them but I think that''s what you need. There is an example that comes with the jdk in which you can change the font and color of text, and insert images.
I may have overlooked it, but I couldnt find the information
I needed on the URL you gave.
It seems like it would be pretty simple, but I just cant seem to find source so I can change font attributes [color, etc] and insert pictures inside a textarea.
maybe they use something other than textarea?
I needed on the URL you gave.
It seems like it would be pretty simple, but I just cant seem to find source so I can change font attributes [color, etc] and insert pictures inside a textarea.
maybe they use something other than textarea?
http://fakemind.com
You''re not looking for textarea stuff. You should be looking for styled document stuff. There''s an example in the jdk distributuion
\demo\jfc\StylePad\
java -jar Stylepad.jar
I''m sure that is for what you are looking, right?
java -jar Stylepad.jar
I''m sure that is for what you are looking, right?
couldnt look at it tonite, but if Im not mistaken, swing is for Java 1.2 and greater, I was just curious which browsers support Java 1.2 and greater?
http://fakemind.com
Well, none right now. That''s why we have the Plug-In available for most platforms. Now, most probably, future versions of the browsers will support JDK 1.2, but until then you have to learn how to deal with the nuances of the Plug-In, which in my opinion, is still new technology and has plenty of problems.
JoeG
JoeG
joeG
then how does Yahoo.com chat do their java chat clients?
They have colored text, and images inside their "textarea".
There must be a way to do this under Java 1.0 then right?
They have colored text, and images inside their "textarea".
There must be a way to do this under Java 1.0 then right?
http://fakemind.com
What if I tried to create my own textarea from the classes that textarea get its inheritance from? would that be possible, and then I could add in colored text?
Somebody suggested using a Canvas to impersonate a textarea, but that way I could do anything to it, colored text, pictures, anything. How would I implement this?
Somebody suggested using a Canvas to impersonate a textarea, but that way I could do anything to it, colored text, pictures, anything. How would I implement this?
http://fakemind.com
I don''t imagine that there would be any problem with you just using the javax.swing.text package and just including it in your distribution. Most of the stuff you need are interfaces, and the concrete implementations directly extend java.lang.object. If not, you can still look at the source for ideas on what methods to use if you are going to extend textarea yourself.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement