JEditorPane and custom editor kit

前端 未结 3 1822
青春惊慌失措
青春惊慌失措 2021-01-27 01:44

I\'ve a trivial question. I need to load an existing file into JEditorPane using custom editor kit. I\'ve a editor kit, a file with some extension and I need to for

3条回答
  •  半阙折子戏
    2021-01-27 02:29

    Set your EditorKit and user the kit's read() method passing the file there.

    The reader used in the read method should understand how to parse the content.

提交回复
热议问题