Hiran
Posts: 41
Nickname: jclu
Registered: Mar, 2002
|
|
Re: how can i do the word processor's page operations in my java word processor
|
Posted: Apr 12, 2002 7:37 AM
|
|
Check out the java documentation, and search http://java.sun.com/docs/books/tutorial/ for JTextPane. I started to develop a java word processor as well, and from what I remember, you will have to work with <code>Document</code>s and/or <code>StyledDocument</code>s. Instead of having multiple JTextPanes, you'll probably only need one JTextPane. Then have a class that either extends or uses (as a member variable) the <code>StyledDocument</code> class. This class will contain the content of each page. Then when the user goes to another page in a file, your program will get the content of that page (from the object that's holding the contents) and display it in your text pane. I hope this makes sense. If not, email me at hw_stuckie@hotmail.com and let me know. Hiran
PS. I kinda gave up on my java word processor, but I'm still interested in creating one. If you would like to work together on this, email me and let me know. Thanks.
|
|