Changeset 163 in josm


Ignore:
Timestamp:
2006-10-14T01:51:35+02:00 (16 years ago)
Author:
imi
Message:
  • fixed Help so that it starts top-scrolled
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/actions/HelpAction.java

    r155 r163  
    1010import java.awt.event.WindowAdapter;
    1111import java.awt.event.WindowEvent;
     12import java.io.IOException;
     13import java.io.StringReader;
    1214
    1315import javax.swing.AbstractAction;
     
    160162        public void setHelpUrl(String url) {
    161163                this.url = url;
    162                 help.setText(reader.read(url));
     164                try {
     165                        help.read(new StringReader(reader.read(url)), help.getEditorKit().createDefaultDocument());
     166        } catch (IOException e) {
     167                help.setText("Error while loading page "+url);
     168        }
    163169                helpBrowser.setVisible(true);
    164170        }
Note: See TracChangeset for help on using the changeset viewer.