Results 1 to 3 of 3
  1. #1
    Sedu is offline Member
    Join Date
    May 2015
    Posts
    2
    Rep Power
    0

    Default Complex formatting within a text field

    I'm looking for a method that will allow for complex formatting within a single text box using Swing. I'm currently working on a linguistic program, and users must be able to swap between different fonts in a single text box to have a standard English font followed by one being used for non Latin characters. At the end of the day, the big requirement is just that multiple different fonts be usable within a single text box simultaneously. Is there any way to create a very basic editor like this? Any assistance would be really appreciated!

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,143
    Rep Power
    14

    Default Re: Complex formatting within a text field

    Sounds like a job for a JEditorPane or a JTextPane.

    This is the first result for googling "java text components": https://docs.oracle.com/javase/tutor...ents/text.html
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  3. #3
    Sedu is offline Member
    Join Date
    May 2015
    Posts
    2
    Rep Power
    0

    Default Re: Complex formatting within a text field

    Thanks very much! This showed me exactly what I needed to know and a lot more!

Similar Threads

  1. Adding Text from button to text field.
    By Irish Rayray in forum AWT / Swing
    Replies: 3
    Last Post: 02-13-2013, 06:38 PM
  2. Replies: 1
    Last Post: 09-06-2012, 11:53 AM
  3. Replies: 0
    Last Post: 07-24-2012, 08:07 AM
  4. Text formatting and alignment according to the printer
    By java_fledgeling in forum Advanced Java
    Replies: 2
    Last Post: 06-08-2010, 10:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •