Incorporating Patrick's changes. I am not reall sure about the changes after the war, it is really 'or' it cannot be 'and'. I will change that when I do the reading through the whole chapter.
1 package accessprotectedmethod;
3 import javax.swing.text.AbstractDocument;
4 import javax.swing.text.Element;
5 import javax.swing.text.StringContent;
7 // BEGIN: public.accessor
8 public class MyDocument extends AbstractDocument {
9 public MyDocument() {super(new StringContent());}
11 final void writeLockAccess() {
14 // FINISH: public.accessor
17 public Element getDefaultRootElement() {
18 throw new UnsupportedOperationException("Not supported yet.");
22 public Element getParagraphElement(int pos) {
23 throw new UnsupportedOperationException("Not supported yet.");