Like i said in my last topic, i'm trying to get the content of a remote file.
Java is not my language of choice so I have some difficulties as you can imagine...
in DemoRootPane.java, i added this lines of code
- Code: Select all
private RSyntaxTextArea createTextArea() throws IOException {
RSyntaxTextArea textArea = new RSyntaxTextArea();
textArea.setSyntaxEditingStyle(SYNTAX_STYLE_NONE);
URL test= new URL("http://www.domaine.com/1.txt");
BufferedReader in = new BufferedReader(
new InputStreamReader(
test.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
textArea.setText(getText(inputLine));
textArea.setCaretPosition(0);
textArea.addHyperlinkListener(this);
textArea.requestFocusInWindow();
textArea.setMarkOccurrences(true);
in.close();
return textArea;
}
But this error "Caused by: java.lang.ClassCastException: FileContent cannot be cast to java.applet.Applet" is returned.
Can you help me again please ?
