Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Java: Links, images, font and divisions with HTML / CSS

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default 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


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default 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.
    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.

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default 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

  4. #4
    Forum old-timer
    Join Date
    Nov 2008
    Location
    Faversham, Kent, UK
    Posts
    472
    My Mood
    Mellow
    Thanks
    4
    Thanked 58 Times in 54 Posts

    Default Re: Java: Links, images, font and divisions with HTML / CSS

    Quote Originally Posted by chrisjochris View Post
    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...

Similar Threads

  1. How to Change JTextArea font, font size and color
    By Flash in forum Java Swing Tutorials
    Replies: 7
    Last Post: January 14th, 2012, 10:47 PM
  2. LinkedIntLists issue - how can i move links without creating nodes?
    By bh-chobo in forum What's Wrong With My Code?
    Replies: 0
    Last Post: December 1st, 2010, 03:59 AM
  3. changing the visited links color in JEditorpane
    By nasi in forum AWT / Java Swing
    Replies: 5
    Last Post: April 18th, 2010, 08:44 AM
  4. Related to Html and Java Script?
    By JackyRock in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: February 17th, 2010, 03:10 AM
  5. Help with html tags in java
    By peliukasss in forum Member Introductions
    Replies: 0
    Last Post: February 2nd, 2010, 06:47 AM