Jump to content

JEditorPane HTML

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
dunnkers

dunnkers

    Learning Programmer

  • Members
  • PipPipPip
  • 31 posts
I have this JEditorPane:

private JEditorPane chat = new JEditorPane("text/html", "Welcome to Dunnkers Chatbox!");


I want to add a 'enter' in the text. I tried using a <br/>, doesn't work. I tried a <p>. It skips two lines instead of one.

Can anyone help?

#2
dunnkers

dunnkers

    Learning Programmer

  • Members
  • PipPipPip
  • 31 posts
I already found it out myself, a simple <div> did fine.
Thanks anyways for reading.

#3
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
Does a simple \n work?

edit: aww 5 seconds too late.