• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

text editor: arraylist

 
Castulo Ruiz
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm trying to create a simple text editor, but I not sure how to use the method set_curr_line to change the current line int he buffer to a integer. Then it would print out the new current line. I need a push on how to do this.



 
jittu goud
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
welcome to javaranch ....please embed your code in [CODE] tags ....
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Based on your question, I have to assume you're just starting out in Java, and didn't write this code yourself. If you wrote this, there's no way you'd need to ask this question. On the other hand, if this code was written by someone who's going to be teaching you to write code like this, my advice is to run for the hills. If this is a University course, ask for your money back, and see if you can't get the instructor fired. Holy cow, this is really something else.

In any case, I think you're expected to actually create a method called set_current_line which takes an int argument, and sets the appropriate member in the edit_buffer object. Replace the call to "STUB" with a call to the new method. Does this help at all?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic