• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextPane + Document + Attributes issues

 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is my base code. It is what you call an SSCE. I took out the irrelevant code and left the bare basics. My code is from a chat client that I built. I am rebuilding it with the JTextPane instead of the JTextArea. Nothing is showing up in the JTextPane when I push enter in "output". What am I doing wrong?
Thanks,
John Price aka cc11rocks

EDITS: Removed more unnecessary things.

By "base code", I mean the very bottom of the code. This is the shortest way that I can show working code. This compiles fine and has no errors whatsoever. It compiles and runs with no errors at all. Anyway, I am probably implementing this wrong... Please help!
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Figured it out...
Solution:

Thanks,
cc11rocks aka John Price
 
Paul Clapham
Sheriff
Posts: 21867
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There ya go. Such a small thing.

But I see you're making progress with the character attributes thing. I was surprised that the Oracle tutorial on JTextPane didn't cover that much, and the API documentation was kind of vague too. So you've got beyond that. Good work.
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much! I'm having issues with my code now, but it has nothing to do with the JTextPane.
Thanks,
cc11rock aka John Price
 
Paper has not yet been outlawed – so let your Java Swing application print with wild abandon: JPDF
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!