• Post Reply Bookmark Topic Watch Topic
  • New Topic

BBcode  RSS feed

 
Bod McLeon
Ranch Hand
Posts: 65
Eclipse IDE IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there to do BBcode in java (I think it's BBcode, though I'm not 100% certain on it) like strikethroughs and coloured text?
I would mostly like to know how to do strikethroughs  thought.
Oh and lastly is there a way to put images in a JOptionPane?
So instead of .showInputDialog but like .PLAIN_MEASSAGE and a photo in the GUI

Thanks
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bod McLeon wrote:
Oh and lastly is there a way to put images in a JOptionPane?
So instead of .showInputDialog but like .PLAIN_MEASSAGE and a photo in the GUI


All the JOptionPane#showXXXDialog methods accept an Object as a message. So yes, you can show a photo in it
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For strike through you don't need BBcode. See this example http://www.java2s.com/Code/Java/2D-Graphics-GUI/TextAttributeUnderlineandstrikethrough.htm
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah ok! I thought the BB code was Ranch related.

Another option is using the required tag.
JLabel supports HTML. So you can have text inside it like
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!