Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CSS in Java  RSS feed

 
Johan Brink
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Could you maybe help me on a question here?

I'm trying to implement CSS in Java via a JEditorPane and an HTMLEditorKit. The CSS is included below. It *should* create a container with one on the left, small, and one on the right, large. It works flawlessly on JSFiddle (http://jsfiddle.net/xc295/), but on Java, it won't put the two divs next to each other. Is this a problem in Java/Netbeans or is it my problem? It creates the divs, but beneath each other. The JEditorPane is wide enough for all of them to fit.

Coding:

Java:

CSS:


 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javax.swing.text.html.HTMLEditorKit supports HTML 3.2 and no CSS, if memory serves. Try the javafx.scene.web.WebView that's built into JavaFX if you need to support recent web standards.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!