• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

JTextPane + Document + Attributes issues

 
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Figured it out...
Solution:

Thanks,
cc11rocks aka John Price
 
Marshal
Posts: 27366
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Nothing? Or something? Like this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic