This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes rtf file in netbeans?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "rtf file in netbeans?? " Watch "rtf file in netbeans?? " New topic
Author

rtf file in netbeans??

Prasi Ram
Greenhorn

Joined: Oct 12, 2010
Posts: 12
Hello Everybody,

I want to read a rtf file for my J2me application, the problem is when i read the file the words that has effects like bold and italic are displayed like " \b \i word \b\i" . Is there anyway to read a rtf file properly to mob application. Please help me.. My IDE is Netbeans 6.9.

Thanks in advance
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
It seems that the contents of the file are displayed as text, without the RTF markup being interpreted properly. Are you certain that whatever component you're using to display the text can handle RTF?

(By the way, NetBeans is an IDE - it has no bearing on what happens at runtime.)
Prasi Ram
Greenhorn

Joined: Oct 12, 2010
Posts: 12
hello Lester Burnham,
Iam reading normally using file, fileInputstream things and putting them to Vector.. I dont know is this the right answer for your question..
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
What is important is not so much how the file is read, but how it is displayed. Does the view component understand what RTF is, and how to display it? Personally, I would be surprised if one of the standard JME API components can display RTF (I'm assuming you're using standard JME classes, since you don't mention using anything else).
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

I would be surprised if any Java ME Item has the capability to display formatted text.


luck, db
There are no new questions, but there may be new answers.
Prasi Ram
Greenhorn

Joined: Oct 12, 2010
Posts: 12
Thanks for the responses.. Actually even my self trying this for the first time. . I want to add some special characters and effects like(bold, italic ) to the text file which i have kept the contents.. So i thought y dont we go with RTF , so trying to implement

Lester Burnham, iam displaying the text items using normal graphics class drawstring functions, this time also I am not sure is this the right answer for your question
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Yes, it does answer the question of whether you're using a component that can handle RTF. Unfortunately, the answer seems to be "no", so unless you find a component that knows about RTF -or implement one yourself- you're stuck.
Prasi Ram
Greenhorn

Joined: Oct 12, 2010
Posts: 12
Hmmmmm Let me try something else then..
 
jQuery in Action, 2nd edition
 
subject: rtf file in netbeans??
 
Similar Threads
How to update an RTF template file in java?
Java API for RTF to DOCX Conversion
RTF to PDF Conversion
Read RTF File from Java
RTF to Text with CJK characters