Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HTML into java code

    Hey guys,

    I was wondering if you could take source code from a website shown in HTML and convert it into java code. Is there any way to see the source code in java code instead of HTML?

    Thanks.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Nope, you can't really view the source of Java code. The bytecode may be somewhat legible though, but its not the same as the source.
    To create Java from HTML you would need to write a parser to effectively go through the html source and build the necessary components you want to display as java components. So you would check for an input type of text, and give it a JTextField for example. Layout will be much harder as you'll need to write a CSS parser for it, then give it explicit layout settings for each component. Won't be pretty for things that are inherited like block levels in HTML since Java doesn't understand what that is so it'll just keep stacking components on top of components.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •