Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6853283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:29:37+00:00 2026-05-27T01:29:37+00:00

I’m beginning to write a source-code editor in Java as a personal project/hobby. Before

  • 0

I’m beginning to write a source-code editor in Java as a personal project/hobby. Before I lead myself down any awful paths, I would like to ask a few questions:

  • Is a JTextPane an appropriate component to use for editing the text? As far as examples I have seen go, it looks like it could become very troublesome and perhaps even very SLOW/memory inefficient to style text in large files, as String arrays are used in styling, which could become very large very quickly. (Note: I require the ability to insert components, such as images, in addition to text in my editor. I have only seen the ability to do so in JTextPane.)

    • Would internally marking up the text with XML/HTML and using something as simple as a JPanel to render it be a more computationally/memory efficient, albeit less simple, route?
  • When loading the source of the file into a program, would a better design choice be to load the entire file, or load only what is being viewed, plus a small to moderately-sized buffer?

  • Any other advice as I embark on a long journey of a hobby would be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:29:38+00:00Added an answer on May 27, 2026 at 1:29 am

    Q1: Have you tried it? Its certainly enough to start with, and you’ll run into other issues along the way. Just try not to design around it exclusively. i.e. don’t program yourself into a corner so you can switch later if you want.

    Q2: I doubt it.

    Q3: Load the entire file into memory – hands down. Your computer has a lot of RAM, so use it.

    Q4: Try several different quick prototypes. There’s nothing wrong with a few failed attempts if you don’t invest too much in them and you learn a lot when you do them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have thousands of HTML files to process using Groovy/Java and I need to
I have this code to decode numeric html entities to the UTF8 equivalent character.
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.