There is a fairly complicated ( for me ) application I'm making for my computer science class. Is a recipe organizer ( or Database).
I want the user to be able to align their highlighted text and change its color, font, and size.
What is the best way to do this since I will store my data in a text file.. Or is impossible?
1 reply to this topic
#1
Posted 12 December 2011 - 08:25 AM
|
|
|
#2
Posted 13 December 2011 - 10:50 AM
You will lose the formatting if you decide to store it as plain text. What you'll need to do is decide on what kind of encoding to use for the formatting.
If you use a JEditorPane, it supports HTML markup, which should easily provide all the formatting options you require. HTML should store just fine as text in a database.
If you use a JEditorPane, it supports HTML markup, which should easily provide all the formatting options you require. HTML should store just fine as text in a database.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









