5 Replies - 3208 Views - Last Post: 22 March 2011 - 03:04 PM Rate Topic: -----

#1 IamTw_  Icon User is offline

  • D.I.C Head

Reputation: 32
  • View blog
  • Posts: 238
  • Joined: 25-February 11

Text Editor in java

Posted 22 March 2011 - 07:31 AM

Hi

I am doing the excercises from the list by Martyr2:

http://www.dreaminco...ct-ideas-lists/

I really recommend to all beginners to look into these, you will surely find some of them to your liking.
They are both fun, challenging you to grow as a programmer, frustrating, and fun again :D
And there are maaany categorys

Now, back to why I'm posting. I want to do this excercise

" Text Editor Notepad style application that can open, edit, and save text documents. Add syntax highlighting and other features "

But I have no clue as where to start. I have searched on this site in hope for finding similar questions, but did not find one that satisfied my problem. So I thought that some of you maybe had done this excercise, or just know where to begin? And maybe even have a useful link?

Thanks in advance

Is This A Good Question/Topic? 0
  • +

Replies To: Text Editor in java

#2 TFoSSDQ  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 123
  • View blog
  • Posts: 253
  • Joined: 09-December 10

Re: Text Editor in java

Posted 22 March 2011 - 07:47 AM

JEditorPane is useful: Documentation
It has support for rtf and it usefull for syntax stuff.
Was This Post Helpful? 1
  • +
  • -

#3 Luckless  Icon User is offline

  • </luck>
  • member icon

Reputation: 292
  • View blog
  • Posts: 1,146
  • Joined: 31-August 09

Re: Text Editor in java

Posted 22 March 2011 - 08:05 AM

You'll also need to load/save files. One way you could do this is to read in files to the Text Pane then once you 'Save' it, the program will write what is in the Pane to the document
Was This Post Helpful? 1
  • +
  • -

#4 Ember  Icon User is offline

  • D.I.C Head

Reputation: 70
  • View blog
  • Posts: 160
  • Joined: 24-April 10

Re: Text Editor in java

Posted 22 March 2011 - 10:24 AM

View PostLuckless, on 22 March 2011 - 08:05 AM, said:

You'll also need to load/save files. One way you could do this is to read in files to the Text Pane then once you 'Save' it, the program will write what is in the Pane to the document

*Hints for those two*
Saving
Opening

at least, those are what I would use for a text editor.
Was This Post Helpful? 1
  • +
  • -

#5 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10185
  • View blog
  • Posts: 37,603
  • Joined: 27-December 08

Re: Text Editor in java

Posted 22 March 2011 - 02:40 PM

Check out this tutorial on File I/O. For syntax highlighting, take a look at creating a custom EditorKit for the JEditorPane.
Was This Post Helpful? 1
  • +
  • -

#6 IamTw_  Icon User is offline

  • D.I.C Head

Reputation: 32
  • View blog
  • Posts: 238
  • Joined: 25-February 11

Re: Text Editor in java

Posted 22 March 2011 - 03:04 PM

Thanks to all of you guys, I have taken a look at the things you provided, and I'm sure it's gonna be helpful,
nontheless, I have an idea of where to start now :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1