• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CSS in Java

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Whose rules are you playing by? This tiny ad doesn't respect those rules:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic