Help!!!!

java Malaysia
  • 17 years ago

    JAVA support HTML code as well


    but y i cannot run this code??


    new jLabel1 = new JLabal("<HTML><a href="index.htm"> Get Help </a></HTML>");


    plz help me... i stuck at here...
    izzit i need to use getURL method??


    thanks all..

  • 17 years ago

    haha, im having the same trouble !!!


    Quote:
    new jLabel1 = new JLabal("<HTML><a href="index.htm"> Get Help </a></HTML>");


    im no expert at java, but that looks like a major problem.
    doesnt that say you want to declair an object of class new ??


    shouldnt it be


    JLabal jLabel1 = new JLable(HtmlString);


    that should compile, as for telling the label to accept html, thats what im struggling with.
    my notes tell me to use a setContentType("text/html"); method
    but that may only work for JEditorPane objects, not sure.


    ALSO, you cannot use "'s insode of strings, use \" instead.


    e.g.


    ("<HTML><a href=\"index.htm\"> Get Help </a></HTML>");

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Walking on water and developing software from a specification are easy if both are frozen.” - Edward V Berard