Java: Links, images, font and divisions with HTML / CSS
Hey,
I have a big concern about coding a nice UI for my upcoming CompSci project after winter break, and it will be a card game. However, I've already programmed several card games with PHP, so the only thing that would be left is the actual GUI for my JFrame window. I want to display a rich HTML-Based JFrame, with links, entire headers, and divisions made up of HTML and CSS (real code, and not only displaying the source code!). I've googled a lot, and most websites were pointing on web browsers, therefore I've started asking here, if anyone knows how to begin, which import is responsible for it, and which statements I need to use to add it to my JFrame.
As an example this: myimg.de - kostenloses Bilderhosting.
If it's still hard to understand what my concern is, - it's impossible to draw a string from an actionPerformed method, therefore I need to use HTML code in order to display public or private Strings within the class.
It would be an awesome help if there's anyone,
Regards
Re: Java: Links, images, font and divisions with HTML / CSS
If I understand correctly, you want a java swing component that can display html like a web browser? JEditorPane's have the capability for basic html and css, but I'd say the capability is a bit limited.
Code :
it's impossible to draw a string from an actionPerformed method
Not sure what you mean...this capability is relatively easy if the actionPerformed method calls on another JPanel, setting a string variable and calling repaint to draw the string.
Re: Java: Links, images, font and divisions with HTML / CSS
Well, not exactly a web browser, but to display real time HTML/CSS code within my JFrame, so that I can work without Java, and more designing better frames.
Example: http://oi54.tinypic.com/20zyyap.jpg
Re: Java: Links, images, font and divisions with HTML / CSS
Quote:
Originally Posted by
chrisjochris
As Java is the most complicated language of the web world
You think? How many 'languages of the web' world are you familiar with?
Methinks this character is posting just to advertise the coupon site in his signature...