|| | |||Browse by category|
How do I create a java.net.URL to refer to a CSS in a .jar file?
setStyleSheet methods for many JViews objects expect a String in the form of a proper
java.net.URL. If you wish to refer to a CSS style sheet in a .jar file, you can build an appropriate
java.net.URL of the form:
jar:<jar url>!/<path to style sheet in JAR file>
For more information, please refer to the documentation of
For an application using
IlvDiagrammer, please note that the
IlvSDMEngine.setStyleSheets method will also set and use the specified URL as the base location to find the application resources. If you provide a URL to a CSS in a .jar file, the .jar file will become the base URL. Consequently, your graphical resources, such as images, symbols, and so on, need to be findable. You can make them findable either by placing them within the same .jar file, or by invoking a separate call to
IlvSDMEngine.setBaseURL after setting the style sheets.