• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

CSS in Java

 
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:


 
Rancher
Posts: 43016
76
  • 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.
 
    Bookmark Topic Watch Topic
  • New Topic