February 04, 2023, 04:38:36 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: My new email:
email me if u need anything Tongue
  Home   Forum   Help Search Arcade Staff List Login Register  

JEditorPane text file as html

Pages: [1]   Go Down
Author Topic: JEditorPane text file as html  (Read 214 times)

Reputation +0/-0
Offline Offline

Posts: 10

View Profile
« on: October 11, 2014, 06:43:15 pm »

I would like my JEditorPane to process any text file as html file.

String file = "cube.obj";
JEditorPane t = new JEditorPane();
try {
   URL url = new URL(getCodeBase(), file);
} catch (NumberFormatException | IOException e) {

Is it possible? My first idea was to read my text file line by line and add these lines to editor pane, but is there any more "elegant" solution?
Report Spam   Logged

Share on Facebook Share on Twitter

Pages: [1]   Go Up
Jump to:  

Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum
Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy