• Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding java.awt.TextArea  RSS feed

 
ch praveen
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
At present Iam using AWT to build an interface in an applet. I can't switch to Java Swings as every client may not have plugin to render swing components. So, I want to accomplish interface through AWT components only. Can anyone guide me how to display images in java.awt.TextArea and how to display text in different colors in java.awt.TextArea. Is there any alternate way to accomplish this through AWT?
Regards,
Ch.Praveen
 
Chris Jebaraj
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Praveen,
U cant display diff text in diff colors in a JTextArea. U can very well do it in JTextPane or JEditorPane. I hope with the image also the case. U cant do it in JTextArea and can do it in JTextPane or JEditorPane. Why cant u try out in JTextPane.....
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ch praveen:
Hello Friends,
At present Iam using AWT to build an interface in an applet. I can't switch to Java Swings as every client may not have plugin to render swing components. So, I want to accomplish interface through AWT components only. Can anyone guide me how to display images in java.awt.TextArea and how to display text in different colors in java.awt.TextArea. Is there any alternate way to accomplish this through AWT?
Regards,
Ch.Praveen

Not easily. You might be able to write a custom AWT component to do this but I wouldn't want to try it.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeba Raj:
...Why cant u try out in JTextPane.....

Could it be because he said...

I can't switch to Java Swings as every client may not have plugin to render swing components.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!