LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-25-2005, 11:46 PM   #1
caged
Member
 
Registered: Jan 2004
Location: new zealand
Distribution: Mandrake,Slackware
Posts: 165

Rep: Reputation: 30
using CSS to format HTML in a Java - JLabel


Hi peoples.

I am trying to add an extra bit of flair to a java project I am doing. the project requires I output a load of text from a database to a label or text field. I have sorted out using HTML code in the JLabel component (wassn't hard) But.... I cant figure out how to use CSS to format the HTML code. I have tried by way of the <link> tag in the header (the usual way i do it in actual webpages) I have also tried using the embedded <style><!--... --></style> tags. but i have had no luck.

Is it possible to use CSS to mark up this type of HTML or does Java not actually parse the CSS code???

any help appreciated

cheers,
Ben.
 
Old 09-26-2005, 01:17 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Java/Swing does not really support CSS: it's really intended for simple markup like font face or color (precisely the kinds of stuff that CSS was designed to take *out* of HTML!)

Last edited by paulsm4; 09-26-2005 at 01:20 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A little HTML/CSS help? jon_k General 9 07-17-2005 01:49 AM
html/css retrodict Programming 5 11-01-2004 06:56 PM
[JAVA - JLabel] executing a method based on contents of the variable linux_ub Programming 1 08-12-2004 09:50 AM
Controlling size of JLabel and JTextFields in Java linux_ub Programming 0 07-27-2004 08:32 AM
html/css hylke Programming 0 06-27-2004 02:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration