Border on a JEditorPane

Hi there,
I'm trying to create a LineBorder on a JScrollPane, which I want to be in the center of a JPanel, the latter having no other components added.
Please could someone tell me how to do this. I can do this with an EmptyBorder and MatteBorder, but cannot do this with other borders. How can I?
Currently I have done it by adding an Empty/MatteBorder to the JScrollPane, which I add to the center of a JPanel. This works but looks silly. Is the proper way to create an empty border for the JPanel, then add the JScrollPane to that - because if it is, when I try it the JScrollPane resizes itself to a ridiculously small size in the middle of the JPanel - which I don't want.
Please could you help because - well.. because that'd be great.
Thanks again guys..
Edward.

import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
import javax.swing.*;
import javax.swing.border.*;
public class BorderOnImage {
    public static void main(String[] args) throws IOException {
        int h = 100, w = 300;
        Border b = new BevelBorder(BevelBorder.RAISED, Color.LIGHT_GRAY, Color.GRAY);
        BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
        Graphics2D g = image.createGraphics();
        g.setColor(Color.WHITE);
        g.fillRect(0,0,w,h);
        b.paintBorder(new JPanel(), g, 0, 0, w, h);
        g.dispose();
        ImageIO.write(image, "png", new File("test.png"));
}

Similar Messages

  • Drow dot-style table border in JEditorPane (editing HTML)

    Hi,
    I want to extend JEditorPane to display table border in dot style when
    displaying tables with border="0". (like most HTML editors)
    I extended HTMLEditor and it's ViewFactory and now maybe I have to write extended TableView class for rendering my tables.
    I tried to do that, but without any success.
    Can any one advice my how can I rewrite the paint method or some kind of example how to make it.
    Thanks in advance.

    Hi, i had advantage but i did it in a very stupid way. I copy/pased the
    original source and modified some inner classes.I do not remember exactlly what i did (right now i do not have the source).
    I modified BoxView and BoxPainter inner classes to achieve this effect.
    When i have the source I will paste it here.
    Have fun.

  • Problem to display Animated Gif from HTML into JEditorPane

    I have a problem displaying animated gif that comes from URL (HTML) into JEditorPane.
    Let me show you the source I have:
    * @author Dobromir Gospodinov
    * @version 1.0
    * Date: Dec 6, 2002
    * Time: 6:47:53 PM
    package test.advertserver;
    import javax.swing.*;
    import java.awt.*;
    import java.io.IOException;
    public class Test {
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              JEditorPane ed = new JEditorPane();
              try {
                   ed.setPage("http://localhost:8200/servlet?key=value");
              } catch (IOException e) {
                   e.printStackTrace();
              JPanel panel = new JPanel();
              panel.setPreferredSize(new Dimension(500, 500));
              panel.add(ed);
              frame.getContentPane().add(panel);
              frame.pack();
              frame.setVisible(true);
    }Part of the returned from servlet HTML includes an img tag:
    <img src="/images/MyAnimatedGif.gif" alt="animated gif comment" width="480" height="50"  border="0">Let us assume that MyAnimatedGif.gif has 10 frames and gif is looped - when the 10th is dipslayed it has to display the 1st and so on.
    JEditorPane displays frames from 1 to 10 correctly but does not start from the first again. Instead JEditorPane displays a broken image.
    I locate where the problem arise:
    JEditorPane has an HTMLEditorKit that creates javax.swing.text.html.ImageView instance for every IMG tag.
    And here is the problem:
    ImageView has an ImageObserver necessary for the asynchronous image download. ImageObserver has the imageUpdate method. But this imageUpdate method is never called with ALLBITS flag raised up. Instead, after the last frame of MyAnimatedGif.gif is downloaded the imageUpdate method is called with flag ERROR raised up. Obviously this is a bug of Sun's implementation. Finaly the flag ALLBITS has to be received for normal end of image observing. But ALLBITS flag does not come.
    So, can anybody help me how to load an animated gif within JEditorPane completely.
    Thank You in advance,
    Dobromir Gospodinov
    P.S. If somebody of you wants to debbug what happens within ImageView will have to implement it (and related classes too, because of the limited package visability) borrowing the source from Sun's ImageView.

    I'm also having this problem with java 1.4.1 I discovered that some animated gifs work fine, while others stop animating. Running with java 1.3.1 fixed the problem. I'm going to report this as a bug
    Here's my code:
    import java.awt.*;
    import java.io.*;
    import javax.swing.*;
    public class AnimatedGifTester
    extends JFrame
    public static void main(String argv[])
    throws Exception
    new AnimatedGifTester();
    public AnimatedGifTester()
    throws Exception
    String[] images = new String[] {
    "http://www.gif.com/ImageGallery/Animated/Animals/Photographic/dog_running.gif",
    "http://www.gif.com/ImageGallery/Animated/Characters/Cartoon/java.gif",
    "http://www.webdeveloper.com/animations/bnifiles/anielg.gif",
    "http://www.webdeveloper.com/animations/bnifiles/cat2.gif",
    "http://images.animfactory.com/animations/animals/fish/big_fish_swimming_md_wht.gif",
    "http://www.webgenies.co.uk/images/martian.gif",
    "http://www.webdeveloper.com/animations/bnifiles/at_sign_rotating.gif",
    "http://www.webdeveloper.com/animations/bnifiles/arrow_1.gif",
    "http://www.gif.com/ImageGallery/Animated/Characters/Cartoon/javaacro.gif",
    "http://java.sun.com/products/java-media/2D/samples/suite/Image/duke.running.gif",
    "http://www.gif.com/ImageGallery/Animated/SouthPark/Cartoon/stan.gif"
    StringBuffer buffer = new StringBuffer("<html><body>");
    for (int idx = 0; idx < images.length; idx++)
    buffer.append("<img src='" + images[idx] + "'>");
    buffer.append("</body></html>");
    String html = buffer.toString();
    // save a copy of the html to open in a browser so we can see what it's
    // supposed to look like
    BufferedWriter writer = new BufferedWriter(new FileWriter("animatedGifTest.html"));
    writer.write(html);
    writer.close();
    JEditorPane editorPane = new JEditorPane("text/html", html);
    editorPane.setEditable(false);
    getContentPane().add(editorPane);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setSize(new Dimension(400, 600));
    show();

  • Edit html in JEDITORPANE

    HEllo friends!
    I need your help, for editing html in editorpane.
    I want to create a textarea in which the user type simple text than select some part of it & makes it bold, italic etc. by using an event of button or popup any thing.
    So guide me that which textcomponent provide this , i already used JEditorPane, and insert tags manually but it is not good, if i try to overlap the tags og italic & bold.
    So please help me is this any way pre built to provide these func. of add html tags in jeditorpane & use see the render html test in area.
    than please provide me. at [email protected]
    Thanks
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import javax .swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.IOException;
    public class TestJEditor extends JFrame {
    Panel p1 = new Panel();
    JButton b1 = new JButton("BOLD");
    JButton b2 = new JButton("ITALIC");
    BorderLayout borderLayout1 = new BorderLayout();
    JScrollPane jScrollPane1 = new JScrollPane();
    JEditorPane jEditorPane1 = new JEditorPane();
    HTMLEditorKit editorKit = new HTMLEditorKit();
    DefaultEditorKit defaultKit = new DefaultEditorKit();
    public TestJEditor() {
    super("Note");
    this.getContentPane().add(p1);
    //jEditorPane1.setEditable(false);
    jEditorPane1.setEditorKit(editorKit);
    p1.setLayout(null);
    p1.add(jScrollPane1);
    jScrollPane1.setBounds(10, 10, 350, 100);
    jScrollPane1.getViewport().add(jEditorPane1, null);
    b1.setBounds(370, 10, 100, 20);
    p1.add(b1);
    b2.setBounds(370, 40, 100, 20);
    p1.add(b2);
    b1.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e)
         // jEditorPane1.setEditorKit(defaultKit);
         String str = jEditorPane1.getText();
         System.out.println(str);
         String temp = jEditorPane1.getSelectedText();
         if(temp.indexOf("<B>") != 0)
         int start = str.indexOf(temp);
         int end = start + temp.length();
         System.out.println("start "+start+" end "+end);
         str = str.substring(0,start)+"<B>"+str.substring(start,end)+"</B>"+str.substring(end);
         jEditorPane1.setText(str);
         //System.out.println(jEditorPane1.getText());
    b2.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e)
         String str = jEditorPane1.getText();
         System.out.println(str);
         String temp = jEditorPane1.getSelectedText();
         System.out.println("Italic");
         int start = str.indexOf(temp);
         int end = start + temp.length();
         str = str.substring(0,start)+"<I>"+str.substring(start,end)+"</I>"+str.substring(end);
         jEditorPane1.setText(str);
    public static void main(String[] args) {
    JFrame frame = new TestJEditor();
    frame.setSize(600,500);
    frame.addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    //frame.pack();
    frame.show();
    }

    Hi kashif10,
    JEditorPane or JTextPane are the classes to use. You can have both bold and italic for a text portion.
    See http://java.sun.com/products/jfc/tsc/articles/ for an overview of articles covering the swing text package.
    Or try application SimplyHTML at http://www.lightdev.com/template.php4?id=3 it is open source and has a lot of documentation too.
    Ulrich

  • CSS changes ignored in JEditorPane in Java 1.4?

    Our application uses a standard JEditorPane with a content type of text/html to render some HTML files containing tables. These are automatically generated with XSLT and include some stylesheet information to switch the colours of alternating rows in the table so as to make the tables easier to read.
    In Java 1.3. this worked fine. However, I am in the process of porting the application to Java 1.4 and I find that the some of the style changes are being ignored.
    Take this example:
    <html>
    <head>
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Test</title>
    <style type="text/css">
         TABLE { font-size: 9px; font-family: verdana,arial,helvetica; color: green }
         tr.Header { background: #1955aa; color: white; font-weight: bold }
         tr { color: blue; background: white }
    tr.AltData { color: red; background: #eeeeee }
    </style>
    </head>
    <body marginheight="0" leftmargin="5" topmargin="10">
    <h2>Table A202</h2>
    <table cellspacing="0" cellpadding="2" border="1" width="90%">
    <tr class="Header">
    <td>Name</td><td>Type</td><td>Scope</td>
    </tr>
    <tr class="AltData">
    <td>0 Formatted</td><td>Text</td><td>Local</td>
    </tr>
    <tr>
    <td>0 Text</td><td>Text</td><td>Global</td>
    </tr>
    <tr class="AltData">
    <td>Channel</td><td>Text</td><td>Local</td>
    </tr>
    <tr>
    <td>CTable</td><td>Table</td><td>Global</td>
    </tr>
    </table>
    </body>
    </html>
    The standard white background, blue text style assigned to all table rows works fine. But attempting to change the style to 'AltData' on alternate rows (using class="AltData") is ignored.
    Java 1.3 does this correctly, Java 1.4 doesn't. Is there a problem with the HTML? Has something changed that I don't know about? Has anyone seen anything similar and can offer a solution? Switching to a third-party control is not an option, by the way.
    Thanks in advance.

    set the style sheet in the in and HTMLEditorKit and then add the kit to the JEditorPane
    We do some thing simple like this here...
    HTMLEditorKit htmlKit = new HTMLEditorKit();
              StyleSheet ss = htmlKit.getStyleSheet();
              ss.addRule("body {font-family : Verdana;}");
              ss.addRule("td {font-size : 10;}");
              HTMLDisplayer = new JEditorPane(this);   //new JEditorPane();
              HTMLDisplayer.setEditorKit(htmlKit);
              HTMLDisplayer.setContentType("text/html");
              HTMLDisplayer.setEditable(false);
              HTMLDisplayer.setVisible(false);

  • JEditorPane HTML preview

    Hi,
    I've been working on a small class which will render out HTML. There's a few examples on the web, all of which read an HTML file from a URL. JEditorPane works fine for that use, but when I try to specify HTML content as a string the page doesn't get displayed correctly. It's a bit hard to describe but basically if you specify a document as type text/html it tries to generate it's own <html>, <body> tags etc and leaves yours out. If you do happen to specify your own then it just ignores your page content.
    I need to do it that way as the HTML doesn't exist at a URL, only in memory. Does anyone know of a workaround or has anyone else experienced this problem? I'm developing the application using JDK 1.4.0 under Win2k.
    Thanks

    Yeah that's pretty much exactly what I'm doing, although it's pulling the HTML content from the database first.
    Your code outputs this:
    <html>
    <head>
    </head>
    <body>
    <b>Bolloxs</b>
    </body>
    </html>
    As you can see, it's being altered by the application and has had the <head> tags added. In my application it's doing even more, stripping everything inside of the <body> tags.
    I've found the reason though...it doesn't seem to like a meta tag.
    This content:
    String html = new String("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><title>This is my title</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body leftmargin=\"0\" topmargin=\"0\"><table width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>Page content goes here</td></tr></table></body></html>");
    Outputs:
    <html>
    <head>
    </head>
    <body>
    <p>
    </p>
    </body>
    </html>
    Whilst this content (with the meta line removed):
    String html = new String("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><title>This is my title</title></head><body leftmargin=\"0\" topmargin=\"0\"><table width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>Page content goes here</td></tr></table></body></html>");
    Outputs:
    <html>
    <head>
    <title>This is my title </title>
    </head>
    <body leftmargin="0" topmargin="0">
    <table border="0" cellpadding="0" width="600" cellspacing="0">
    <tr>
    <td>
    Page content goes here
    </td>
    </tr>
    </table>
    </body>
    </html>
    Weirdness!?

  • Hyperlink trouble in JEditorPane

    Hi all,
    I am having real trouble with getting a simple HTML document up and running in JAVA. WHY did they make it so HARD?
    I want to be able to use internal links, e.g click here to go to top of page etc.
    Now apparently I need to add a HyperlinkListener to the JEditorPane. In the code you'll see that i've commented it out. If its left in i get
    DisplayHTML.java:61: addHyperlinkListener(javax.swing.event.HyperlinkListener) in javax.swing.JEditorPane cannot be applied to (DisplayHTML)If i change the start class to:
    public class DisplayHTML extends JFrame implements ActionListener, HyperlinkListenerI get:
    DisplayHTML.java:14: cannot resolve symbolAnd even if it did work there is still a mass of code that needs to be implemented for the internal links to work. grrrrrrrrrrrrr for a language that is meant to be excellent on the web it has poor support for HTML.
    If anyone can shed any light on this I would be grateful. Many thanks
    drb2k2
    Anyway here is the code
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.text.StyledEditorKit;
    import javax.swing.text.html.HTMLEditorKit;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.awt.event.*;
    import java.io.*;
    public class DisplayHTML extends JFrame implements ActionListener
         Color Background = new Color(100, 135, 220);
         Color Buttons     = new Color(140, 170, 230);
         Container content;
         String Keep;
         JEditorPane jed;
         public DisplayHTML()
              UIManager.put("Button.select", Buttons);     
              content = getContentPane();
              content.setBackground(Background);
              BorderLayout border = new BorderLayout();
              content.setLayout(border);
              JPanel Button_Panel = new JPanel();
              BorderLayout buttons = new BorderLayout();
              Button_Panel.setLayout(buttons);
              Button_Panel.setBackground(Background);
              JButton Save = new JButton("Save");
              Save.setBackground(Buttons);
              Save.setToolTipText("Press here to save the results file in HTML format");
              Save.addActionListener(this);
              Save.setActionCommand("Save");
              Button_Panel.add(Save, BorderLayout.WEST);
              JButton Quit = new JButton("Quit");
              Quit.setBackground(Buttons);
              Quit.setToolTipText("Press here to exit the screen and loose results");
              Quit.addActionListener(this);
              Quit.setActionCommand("Quit");
              Button_Panel.add(Quit, BorderLayout.EAST);
              content.add(Button_Panel, BorderLayout.NORTH);
              String str = new String("file:\\" + System.getProperty("user.dir") + "\\" +"Analysis.html");
              try
                   URL url =new URL(str);
                   HTMLEditorKit lhekFile = new HTMLEditorKit();
                   jed =new JEditorPane();
                   jed.setEditorKit( lhekFile );
              //     jed.addHyperlinkListener(this);
                   jed.setEditable(false);
                   JScrollPane htmlScroll = new JScrollPane(jed);
                   htmlScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
                   htmlScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
                   jed.setPage(url);
                   content.add(htmlScroll, BorderLayout.CENTER);
              catch(MalformedURLException e){System.out.println("can't find file");}
              catch(IOException e1){System.out.println("can't load file");}
              setSize(400,400);
              setVisible(true);
         public void actionPerformed(ActionEvent e)
    }

    whoops, forgot to include the code
    import javax.swing.*;
    import java.awt.*;
    import java.net.URL;
    import java.net.MalformedURLException;
    import javax.swing.text.html.*;
    import java.awt.event.*;
    import java.io.*;
    public class DisplayHTML extends JFrame implements ActionListener
         Color Background = new Color(100, 135, 220);
         Color Buttons     = new Color(140, 170, 230);
         Container content;
         String Keep;
         JEditorPane jed;
         public DisplayHTML()
              UIManager.put("Button.select", Buttons);     
              content = getContentPane();
              content.setBackground(Background);
              BorderLayout border = new BorderLayout();
              content.setLayout(border);
              JPanel Button_Panel = new JPanel();
              BorderLayout buttons = new BorderLayout();
              Button_Panel.setLayout(buttons);
              Button_Panel.setBackground(Background);
              JButton Save = new JButton("Save");
              Save.setBackground(Buttons);
              Save.setToolTipText("Press here to save the results file in HTML format");
              Save.addActionListener(this);
              Save.setActionCommand("Save");
              Button_Panel.add(Save, BorderLayout.WEST);
              JButton Quit = new JButton("Quit");
              Quit.setBackground(Buttons);
              Quit.setToolTipText("Press here to exit the screen and loose results");
              Quit.addActionListener(this);
              Quit.setActionCommand("Quit");
              Button_Panel.add(Quit, BorderLayout.EAST);
              content.add(Button_Panel, BorderLayout.NORTH);
              String str = new String("file:\\" + System.getProperty("user.dir") + "\\" +"Analysis.html");
              try
                   URL url =new URL(str);
                   HTMLEditorKit lhekFile = new HTMLEditorKit();
                   jed =new JEditorPane();
                   jed.setEditorKit( lhekFile );
                   jed.setContentType("text/html");       
                   jed.addHyperlinkListener(new javax.swing.event.HyperlinkListener()
                        {public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent e)
                             JEditorPane pane = (JEditorPane) e.getSource();
                              if (e instanceof HTMLFrameHyperlinkEvent)
                                  HTMLFrameHyperlinkEvent  evt = (HTMLFrameHyperlinkEvent)e;
                                  HTMLDocument doc = (HTMLDocument)pane.getDocument();
                                  doc.processHTMLFrameHyperlinkEvent(evt);
                              else
                                  try
                                        pane.setPage(e.getURL());
                                  } catch (Throwable t)
                                  {t.printStackTrace();}
                   jed.setEditable(false);
                   JScrollPane htmlScroll = new JScrollPane(jed);
                   htmlScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
                   htmlScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
                   jed.setPage(url);
                   content.add(htmlScroll, BorderLayout.CENTER);
              catch(MalformedURLException e){System.out.println("can't find file");}
              catch(IOException e1){System.out.println("can't load file");}
              setSize(400,400);
              setVisible(true);
         public void actionPerformed(ActionEvent e)
    }

  • Memory leak in Jeditorpane.setText method while displaying html content

    I tried to display a larger size html page using JeditorPane. But I found that there as a huge memory leak after JEditorPane's setText method was called.
    Refering to the below code there was a difference of about 40 MB after the setText method was called.This does not happen if we display the page in rtf format.This finally results in Out Of memry error.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    import java.awt.BorderLayout;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileReader;
    import java.io.IOException;
    import javax.swing.JEditorPane;
    import javax.swing.JFrame;
    public class SampleProgram extends JFrame{
    public JEditorPane pane;
    static public String getContents(File aFile) {
    StringBuffer contents = new StringBuffer();
    try {
    BufferedReader input = new BufferedReader(new FileReader(aFile));
    try {
    String line = null;
    while (( line = input.readLine()) != null){
    contents.append(line);
    contents.append(System.getProperty("line.separator"));
    finally {
    input.close();
    catch (IOException ex){
    ex.printStackTrace();
    return contents.toString();
    public SampleProgram() {
    pane = new JEditorPane();
    pane.setContentType("text/html");
    pane.setEditable(false);
    pane.setCaretPosition(0);
    pane.setAutoscrolls(true);
    getContentPane().add(pane, BorderLayout.CENTER);
    setSize(400,400);
    File file = new File("D:/Audit_Log.html");
    String summary = getContents(file);
    System.out.println("Memory used Before setText invoke ==>" +((Runtime.getRuntime().totalMemory()- Runtime.getRuntime().freeMemory())/1000000)+"M");
    pane.setText(summary);
    System.out.println("Memory used after setText invoke ==>" +((Runtime.getRuntime().totalMemory()- Runtime.getRuntime().freeMemory())/1000000)+"M");
    setVisible(true);
    * @param args
    public static void main(String[] args) {
    new SampleProgram () ;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The html i am trying to display is similar to the one below.But the original content almost 10 times bigger than this html content and it has only td and tr tags. and for this file the leak is about 4 MB and if I use the file 10 times bigger than this it is 40M .
    Any suggestions how to avoid this memory leak?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    <html>
    <body>
    <h1 align="center">Test HTML</h1>
    <table align="center" border="0" width="90%">
    <tr>
    <td>
    <h3>10-Sep-2008 08:11:32 GMT - <i>User</i>
    </h3>
    <h4>Employee 1 - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 2 - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 3, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 4, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 5, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 6, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 7, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 8, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 9, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 10, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 11, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 12, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 13, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 14, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 15, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 16, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 17, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 18, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 19, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 20, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 21, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 22, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 23, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 24, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 25, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 26, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 27, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 28, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 29, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 30, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 31, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 32, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 33, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 34, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 35, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 36, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>Green</td>
    </tr>
    <tr>
    <td>vision</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 37, - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Name</td><td></td><td>xyzxyz</td>
    </tr>
    <tr>
    <td>Place</td><td></td><td>Mangalore</td>
    </tr>
    <tr>
    <td>State</td><td></td><td>Karnataka</td>
    </tr>
    <tr>
    <td>Country</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    <tr></tr>
    <tr>
    <td>Unit </td><td></td><td>India/MT</td>
    </tr>
    <tr>
    <td>Floor</td><td></td><td>MARblE</td>
    </tr>
    <tr>
    <td>Rating</td><td></td><td>Quantity: amount = 45 uom = MT</td>
    </tr>
    </table>
    <br>
    <h4>Employee 60, Employed - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Price</td><td></td><td>India/MT</td>
    </tr>
    </table>
    <br>
    <h4>Employee 61, Employee - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Accept the agreement</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Indicator</td><td></td><td>True</td>
    </tr>
    <tr>
    <td>Conditions</td><td></td><td>AIR</td>
    </tr>
    <tr>
    <td> Status</td><td></td><td>QUALIFIED</td>
    </tr>
    <tr>
    <td>Job Type</td><td></td><td>ddddd</td>
    </tr>
    <tr>
    <td>agreement signed</td><td></td><td>TRUE</td>
    </tr>
    <tr>
    <td>Degree</td><td></td><td>True</td>
    </tr>
    <tr>
    <td> Options</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Quality</td><td></td><td>TRUE</td>
    </tr>
    <tr>
    <td>Quantity</td><td></td><td>123</td>
    </tr>
    <tr>
    <td>Basis</td><td></td><td>TOTAL</td>
    </tr>
    <tr>
    <td>GapPresent</td><td></td><td>TRUE</td>
    </tr>
    <tr>
    <td>Unit </td><td></td><td>MT</td>
    </tr>
    <tr>
    <td>Warning</td><td></td><td>4000000</td>
    </tr>
    <tr>
    <td>Rounding </td><td></td><td>3</td>
    </tr>
    <tr>
    <td>Security</td><td></td><td>OC</td>
    </tr>
    <tr>
    <td>Number</td><td></td><td>61</td>
    </tr>
    <tr>
    <td>Employee Status</td><td></td><td>Rupee INDIA</td>
    </tr>
    </table>
    <br>
    <h4>Employee 61 - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Alternative </td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Advantage</td><td></td><td>all</td>
    </tr>
    <tr>
    <td>Loading</td><td></td><td>all</td>
    </tr>
    <tr>
    <td>flag</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Lateral</td><td></td><td>True</td>
    </tr>
    <tr>
    <td> Mode</td><td></td><td>Null</td>
    </tr>
    </table>
    <br>
    <h4>Employee 61, Chain - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Roll Number</td><td></td><td>1</td>
    </tr>
    <tr>
    <td>Section</td><td></td><td>AA</td>
    </tr>
    <tr>
    <td>Percentage</td><td></td><td>100</td>
    </tr>
    </table>
    <br>
    <h4>Employee 61, Employee Terms - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Date of Record</td><td></td><td>DateRange
    startDate=01-Jun-2009
    endDate=30-Jun-2009
    </td>
    </tr>
    <tr>
    <td>Continent</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 61, Employed - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Price</td><td></td><td>India/MT</td>
    </tr>
    </table>
    <br>
    <h4>Employee 61, Employed Term 1, Fixed Employed - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Alternative</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Price </td><td></td><td>123</td>
    </tr>
    <tr>
    <td>Unit </td><td></td><td>India/MT</td>
    </tr>
    <tr>
    <td>Floor</td><td></td><td>MARblE</td>
    </tr>
    <tr>
    <td>Remainder</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Rating</td><td></td><td>Return: amount = 55 uom = HH</td>
    </tr>
    </table>
    <br>
    <h4>Employee 61, Employed Term 2, Fixed Employed - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Price </td><td></td><td>123</td>
    </tr>
    <tr>
    <td>Unit </td><td></td><td>India/MT</td>
    </tr>
    <tr>
    <td>Floor</td><td></td><td>MARblE</td>
    </tr>
    <tr>
    <td>Rating</td><td></td><td>Quantity: amount = 45 uom = MT</td>
    </tr>
    </table>
    <br>
    <h4>Employee 61, Demurrage - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Country</td><td></td><td>Africa</td>
    </tr>
    <tr>
    <td>Term Period</td><td></td><td>2 months</td>
    </tr>
    <tr>
    <td>Time Period</td><td></td><td>Asia</td>
    </tr>
    <tr>
    <td>Flag ON/OFF</td><td></td><td>Asia</td>
    </tr>
    </table>
    <br>
    <h4>Employee 61, Organisation Job Settlement Term - <i>Create</i>
    </h4>
    <table border="0" width="100%">
    <th align="left" width="40%"><u>Field Name</u></th><th align="left" width="30%"><u>From Value</u></th><th align="left" width="30%"><u>To Value</u></th>
    <tr>
    <td>Indicator</td><td></td><td>aaaaa</td>
    </tr>
    <tr>
    <td>Alt Event</td><td></td><td>blSPLIT</td>
    </tr>
    <tr>
    <td>Alt Osssssssssssssst</td><td></td><td>2</td>
    </tr>
    <tr>
    <td>Calendar</td><td></td><td>NEW YORK</td>
    </tr>
    <tr>
    <td>Currency Type</td><td></td><td>India</td>
    </tr>
    <tr>
    <td>Day</td><td></td><td>aaaaa</td>
    </tr>
    <tr>
    <td>Event</td><td></td><td>bl</td>
    </tr>
    <tr>
    <td>alter ddddddddd</td><td></td><td>Asia</td>
    </t

    Screen_Name_09, You can post in the bug database.
    http://bugs.sun.com/bugdatabase/

  • HTML Printing with JEditorPane table borders is missing...

    Hi,
    My application prints HTML reports that was rendered on a JEditorPane,
    actually the printing is working fine (almost)...
    After reading a lot of posts and the Printing API i've found a very god aproach to print HTML documents... the DocumentRenderer:
    http://www.fawcette.com/javapro/2002_12/online/print_kgauthier_12_10_02/
    I'm having a strange problem that I was unable to figure out by myself...
    Table borders and table background images never get printed...
    ex: <TABLE BORDER=1 ...
    <td background="image.gif" ...
    On the JEditorPane it shows just fine but, when the page is printed there's no border or table background pictures...
    Everything else is printed ok including images, small fonts, etc...
    Does anyone else had the same problem ?
    Thanks for any help

    The borders present an interesting problem created by the way the DocumentRenderer class finds for printable Views in the HTML. DocumentRenderer searches recursively down the tree of Views starting with the Document's root view looking for leaf views, those with no children. The DocumentRenderer only paints these smallest chunks of text to the printer graphics context. This usually works because leaf views do not usually contain anything paintable.
    The problem with borders is that they represent paintable areas of branch views, those with children. When we only print leaf views, these areas get ignored.
    I see two logical solotions to the problem:
    I. Change the code of the recursive printView method of Document Renderer to print any border that intersects with the current printable clip rectangle.
    II. A much more elegant solution would be to print any view, branch or leaf, that fits within the current printable area, and cease the recursion there. This would include the borders.
    It would also increase efficiency by terminating the recursive method earlier by painting larger chunks of the HTML. A strange problem pops up when I try this, however. When the size of the chunk to be printed gets too big, nothing is printed at all. In the article this is mentioned in the area of large images. "Lastly, large icons do not print. Java simply refuses to render them on the page. Small icons work quite well, however." The same holds true for any large View.
    I have not been able to quantify the exact size where this failure occurs, nor what is causing it. If anyone can tell me what causes this problem, it should be fairly easy, depenging on the cause of the problem, to rewrite the class to print borders and also does lots of other good stuff. I have already coded the new and improved printView method, but this size limitation has made it unworkable.
    Simply stated, if I can figure out why the class does not print large icons, the rest should be easy.
    Any suggestions would be appreciated.
    Thanks,
    Kei Gauthier

  • JEditorPane acting incorrectly

    OK, I posted this previously but no answers. My code used to work with the 1.3 JDK but now it doesn't.
    I set a Jframe with a JEditor Pane inside it. Then I load a html page. If you select output page from the file menu the JEditorPane dumps the html code it has displayed to stdout.
    However the page I load is completely different when outputted from the JEditor Pane. All the html between the form tags is moved outside them. I'm wondereing why this happens.
    Please help...
    Here's the code I'm running, it's very simple (viewer is my JEditorPane):
    import java.io.*;
    import java.util.*;
    import java.awt.event.*;
    import java.awt.Toolkit;
    import java.net.URL;
    import javax.swing.*;
    import javax.swing.text.html.HTMLDocument;
    public class Main extends JFrame implements ActionListener
       public Main() throws Exception
       {  super();
          setSize(Toolkit.getDefaultToolkit().getScreenSize());
          this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          // menu bar
          JMenuBar menubar = new JMenuBar();
          JMenu fileMenu = new JMenu("File");
          JMenuItem nItem = (JMenuItem)fileMenu.add("Output Page");
          nItem.addActionListener(this);
          JMenuItem eItem = (JMenuItem)fileMenu.add("Exit");
          eItem.addActionListener(this);
          menubar.add(fileMenu);
          setJMenuBar(menubar);
          // main component
          viewer = new JEditorPane();
          viewer.setContentType("text/html");
          viewer.setEditable(false);
          scroll = new JScrollPane(viewer);
          getContentPane().add(scroll);
          setVisible(true);
          URL url = new URL( "file:///C:/Documents%20and%20Settings/ross/Desktop/Phd%20Backup/test/test.html");
          viewer.setPage(url);
       public void actionPerformed(ActionEvent ae)
       {  if (ae.getActionCommand().equals("Exit"))
          {   System.exit(0);
          else if (ae.getActionCommand().equals("Output Page"))
             System.out.println(viewer.getText());
       private JScrollPane scroll;
       private JEditorPane viewer;
       public static void main(String[] args)
       {  Main madness = null;
          try
          {  madness = new Main();
          catch (Exception e)
          {  System.err.println(e);
             System.exit(1);
    Here's the content of "test.html":
    <html>
    <head>
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Holiday Search</title>
    <style type="text/css">
          .header { background-color: #9bbadd; font-weight: bold; color: #000040;}
          .odd { background-color: #ffffc0; height:10mm}
          .even { background-color: #ffaf88; height:10mm }
       </style>
    </head>
    <body bgcolor="white" text="darkblue">
    <table bgcolor="#9bbadd">
    <tr>
    <td><font face="helvetica,verdana,geneva,arial" color="#ee0000" size="+2">
    <center>Holiday Search</center>
    </font></td>
    </tr>
    </table>
    <br>
    <table cellspacing="0" cellpadding="3" border="0" width="100%" class="odd">
    <tr class="header">
       <td width="5%">Id</td>
       <td width="15%">Destination</td>
       <td width="15%">Month</td>
       <td width="5%">Persons</td>
       <td width="5%">Nights</td>
       <td width="20%">Hotel</td>
       <td width="10%">Rating</td>
       <td width="10%">Type</td>
       <td width="5%">Price</td>
       <td width="10%"> </td>
    </tr>
    <tr>
    <form action="/obr-holidays/Refine" name="627" method="get">
       <td width="5%">627</td>
       <td width="15%">Fuerteventura<input name="attr" type="hidden" value="Region"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="Fuerteventura"></td>
       <td width="15%">June<input name="attr" type="hidden" value="Month"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="June"></td>
       <td width="5%">3<input name="attr" type="hidden" value="NumberOfPersons"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="3"></td>
       <td width="5%">21<input name="attr" type="hidden" value="Duration"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="21"></td>
       <td width="20%">Hotel Rio Ventura, Fuerteventura</td>
       <td width="10%">FourStars<input name="attr" type="hidden" value="Accommodation"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="FourStars"></td>
       <td width="10%">Bathing<input name="attr" type="hidden" value="HolidayType"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="Bathing"></td>
       <td width="5%">7161<input name="attr" type="hidden" value="Price"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="7161"></td>
       <td width="10%"> <input type="Submit" value="refine..."></td>
    </form>
    </tr>
    </table>
    <table cellspacing="0" cellpadding="3" border="0" width="100%" class="even">
    <tr>
    <form action="/obr-holidays/Refine" name="1149" method="get">
       <td width="5%">1149</td>
       <td width="15%">Salzkammergut<input name="attr" type="hidden" value="Region"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="Salzkammergut"></td>
       <td width="15%">February<input name="attr" type="hidden" value="Month"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="February"></td>
       <td width="5%">3<input name="attr" type="hidden" value="NumberOfPersons"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="3"></td>
       <td width="5%">14<input name="attr" type="hidden" value="Duration"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="14"></td>
       <td width="20%">Dorfhotel Heiligenblut, Salzkammergut</td>
       <td width="10%">FourStars<input name="attr" type="hidden" value="Accommodation"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="FourStars"></td>
       <td width="10%">Recreation<input name="attr" type="hidden" value="HolidayType"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="Recreation"></td>
       <td width="5%">8007<input name="attr" type="hidden" value="Price"><input name="op" type="hidden" value="like"><input name="val" type="hidden" value="8007"></td>
       <td width="10%"> <input type="Submit" value="refine..."></td>
    </form>
    </tr>
    </table>
    </body>
    </html>
    What getText() returns from JEditorPane:
    <html>
      <head>
        <style type="text/css">
          <!--
            .odd { height: 10mm; background-color: #ffffc0 }
            .even { height: 10mm; background-color: #ffaf88 }
            .header { background-color: #9bbadd; color: #000040; font-weight: bold }
          -->
        </style>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Holiday Search    </title>
      </head>
      <body text="darkblue" bgcolor="white">
        <table bgcolor="#9bbadd">
          <tr>
            <td>
              <center>
                <font face="helvetica,verdana,geneva,arial" color="#ee0000" size="+2">Holiday
                Search X
    </font>          </center>
            </td>
          </tr>
        </table>
        <br>
        <table cellpadding="3" cellspacing="0" class="odd" border="0" width="100%">
          <tr class="header">
            <td width="5%">
              Id
            </td>
            <td width="15%">
              Destination
            </td>
            <td width="15%">
              Month
            </td>
            <td width="5%">
              Persons
            </td>
            <td width="5%">
              Nights
            </td>
            <td width="20%">
              Hotel
            </td>
            <td width="10%">
              Rating
            </td>
            <td width="10%">
              Type
            </td>
            <td width="5%">
              Price
            </td>
            <td width="10%">
            </td>
          </tr>
          <tr>
            <td>
              <form method="get" name="627" action="/obr-holidays/Refine">
              </form>
            </td>
            <td width="5%">
              627
            </td>
            <td width="15%">
              Fuerteventura<input type="hidden" value="Region" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="Fuerteventura" name="val">
            </td>
            <td width="15%">
              June<input type="hidden" value="Month" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="June" name="val">
            </td>
            <td width="5%">
              3<input type="hidden" value="NumberOfPersons" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="3" name="val">
            </td>
            <td width="5%">
              21<input type="hidden" value="Duration" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="21" name="val">
            </td>
            <td width="20%">
              Hotel Rio Ventura, Fuerteventura
            </td>
            <td width="10%">
              FourStars<input type="hidden" value="Accommodation" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="FourStars" name="val">
            </td>
            <td width="10%">
              Bathing<input type="hidden" value="HolidayType" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="Bathing" name="val">
            </td>
            <td width="5%">
              7161<input type="hidden" value="Price" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="7161" name="val">
            </td>
            <td width="10%">
               <input type="submit" value="refine...">
            </td>
          </tr>
        </table>
        <table cellpadding="3" class="even" cellspacing="0" border="0" width="100%">
          <tr>
            <td>
              <form method="get" name="1149" action="/obr-holidays/Refine">
              </form>
            </td>
            <td width="5%">
              1149
            </td>
            <td width="15%">
              Salzkammergut<input type="hidden" value="Region" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="Salzkammergut" name="val">
            </td>
            <td width="15%">
              February<input type="hidden" value="Month" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="February" name="val">
            </td>
            <td width="5%">
              3<input type="hidden" value="NumberOfPersons" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="3" name="val">
            </td>
            <td width="5%">
              14<input type="hidden" value="Duration" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="14" name="val">
            </td>
            <td width="20%">
              Dorfhotel Heiligenblut, Salzkammergut
            </td>
            <td width="10%">
              FourStars<input type="hidden" value="Accommodation" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="FourStars" name="val">
            </td>
            <td width="10%">
              Recreation<input type="hidden" value="HolidayType" name="attr"><inputtype="hidden" value="like" name="op"><input type="hidden" value="Recreation" name="val">
            </td>
            <td width="5%">
              8007<input type="hidden" value="Price" name="attr"><input type="hidden" value="like" name="op"><input type="hidden" value="8007" name="val">
            </td>
            <td width="10%">
               <input type="submit" value="refine...">
            </td>
          </tr>
        </table>
      </body>
    </html>Why does this happen, please, please help...

    JEditorPane's HTMLEditorKit primarily supports HTML 3.2. Beyond these basic tags, it handles few tags from later versions of HTML.
    Add "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">" at the beginning of your html file and try to validate it at http://validator.w3.org/ .
    The inconsistent behavior you're experiencing might be solved if you modify your file to make it strictly html 3.2 valid. This is of course just a wild guess.

  • Displaying local image file in JEditorPane with relative path

    Hi All,
    I am showing an html inside JEditorPane. I have set its content type to text/html. The code goes like this,
    StringBuffer bf=new StringBuffer();
    bf.append("<html><head></head><body>");
    bf.append("<img src=\"calendar.gif\" width=\"10\" height=\"10\" border=\"0\">");
    bf.append(" <font face=\"Verdana\" size=\"3\">");
    bf.append("Hi All");
    bf.append("</font><br>");
    bf.append("</body></html>");
    jeditorpane.setContentType("text/html");
    jeditorpane.setText(bf.toString());
    The image calendar.gif is present at the base directory of the package. But still it is not shown in JEditorPane. But if i give full path like,
    <img src="file://C:/man/calendar.gif">
    then image appears.
    Any idea like what is the document root for JEditorPane??
    Thanks in Advance,
    Manjinder Singh

    One solution is to dynamically set the base href
    String s = "test.txt"; // "dummy" file in current directory
    File f = new File(s);
    s = f.getAbsolutePath();
    s = "file:\\"+s;
    p("<BASE HREF='" + s + "'>");

  • Strange behaviour in JEditorPane

    Hi all,
    I'm using JEditorPane for displaying html content. Following is a sample class which initialize JEditorPane, set html content type and finally set some text into the editorPane.
    public class TestComponent extends JPanel{
    JPanel rootPanel = new JPanel();
    JEditorPane editorPane = new JEditorPane();      
    JScrollPane scrollPane = new JScrollPane ();
    Border border1;
    BorderLayout borderLayout1 = new BorderLayout();
    GridBagLayout gridBagLayout1 = new GridBagLayout();
    public final static String TITLE = "<b>"
    + "Test example"+ "</b><br>"
    public final static String BODY_START = "<html><body><font style=\"color:#000000\" face=\"arial,helvetica,geneva,sans\" size=\"3\">";
    public final static String BODY_END = "</font></body></html>";
    private void jbInit() throws Exception{
    border1 = BorderFactory.createEtchedBorder(Color.white, new Color(178, 178, 178));
    this.setLayout(borderLayout1);
    rootPanel.setLayout(gridBagLayout1);
    editorPane.setBorder(null);
    editorPane
    .setEditable(false);
    this.add(rootPanel, BorderLayout.CENTER);
    rootPanel.add(scrollPane
    , new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0
    , GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    scrollPane
    .getViewport().add(editorPane
    , null);
    editorPane
    .setContentType("text/html");
    public void setText(String s){
    editorPane .setText(BODY_START + s + BODY_END);
    editorPane .setCaretPosition(0);
    This panel is initialized and added to some other jPanels and setText() method has been called by giving a string value. The problem is when displaying parent panels (which includes TestComponent) only one panel's editorPane's text is displayed in ash colour. All other panels' editor pane's text is displayed in black colour as specified in html font tag. I have given all colour specific properties in panels same values even though it might not be important as html content type is used in editorpane.
    I have already spent a lot of time analyzing the code, but still unable to find out what's wrong. You guys might not be able to give me the exact answer, but ur hints would be very useful for me to solve this problem.
    This is kind of urgent, please help me.
    Thanks & Regards

    >
    public class TestComponent extends JPanel{
    JPanel rootPanel = new JPanel();
    JEditorPane editorPane = new JEditorPane();
    JScrollPane scrollPane = new JScrollPane ();
    Border border1;
    BorderLayout borderLayout1 = new BorderLayout();
    GridBagLayout gridBagLayout1 = new GridBagLayout();
    public final static String TITLE = "<b>"+ "Test example"+ "</b><br>";
    public final static String BODY_START = "<html><body><font style=\"color:#000000\" face=\"arial,helvetica,geneva,sans\" size=\"3\">";
    public final static String BODY_END = "</font></body></html>";
    private void jbInit() throws Exception{
    border1 = BorderFactory.createEtchedBorder(Color.white, new Color(178, 178, 178));
    this.setLayout(borderLayout1);
    rootPanel.setLayout(gridBagLayout1);
    // --- set everthing regarding editorPane (Children), before added to parent
    editorPane.setBorder(null);
    editorPane.setEditable(false);
    editorPane.setContentType("text/html");
    scrollPane.getViewport().add(editorPane, null);
    rootPanel.add(scrollPane, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
    GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    this.add(rootPanel, BorderLayout.CENTER);
    public void setText(String s){
    editorPane .setText(BODY_START + s + BODY_END);
    editorPane .setCaretPosition(0);
    Try this and then let me know, if it is still doesn't work.

  • JEditorPane isn't generating HyperlinkEvents

    Well, at least that is the way it appears. I am working with NetBeans 3.6 with Tomcat 5, andJ2EE1.4.2_01.
    My Project involves a couple servlets and an applet. The first servlet loads a web page containing the applet. This applet contains a text field and a JEditorPane, with the latter on a JScrollPane. I am using a border layout.
    Everything displays fine. I have no problems with that. When I created this applet on my desktop, all worked well except that the applet would not display documents obtained using the https protocol (it allowed browsing of all my html files when I restricted myself to using the http protocol). I have yet to figure out why. The first time I recreated it on my notebook computer, everything worked fine. I could get and display documents using the https protocol and the JEditorPane would follow the hyperlinks I placed in the html files. I have no idea what is different between those two versions (desktop and notebook #1).
    Now, I have recreated the project a second time, cleaning it up some (mostly removing code that had been commented out and giving some of the data members of some of the classes more useful names), and now everything works except that my HyperlinkListener is not being called. I can't imagine what the "significant" difference is between the two notebook versions may be (I have both versions on my disk so it is easy to check, at least if I knew what to look for). I have made certain that the JEditorPane is NOT editable, and I have invoked addHyperlinkListener(new HyperActive()) on my JEditorPane. This call is, BTW, in function init() which is created by Netbeans to call initComponents() which it creates to create and initialize all the components on a form. init() is used to allow any initialization to be added by the programmer.
    Does anyone have any ideas regarding what mistake I have made?
    Thanks,
    Ted

    Hi. Thanks for this. I am not sure we have understood each other. I say this because I am not sure I understand what you mean by "standalone". If you mean what I think you mean, then that gets to the next question I was going to ask once this one is sorted out. That is, I assume I can modify my applet so that it will work as a standalone application that I could distribute to anyone I have writing html files for me, so they can ensure that their pages display well, and that simply by adding function main.
    It seems unlikely that the JVM is the culprit since on my notebook, there are two versions of the project, one which works (but needs a little cleanup and fixing of names) and one which is being troublesome.
    In each of my three cases, I have two servlets being served up by Tomcat 5. And I have one applet that is always only display in my web browser in response to a request being made to one of my servlets. In one version, it all works as intended, except the code needs to be cleaned up and some of the classes, the context and variables need to be renamed. That is the first version on the notebook.Invariably, NetBeans starts Tomcat if it isn't already running, and then it passes a request to the first servlet, by starting MS IE with the URL for the web page containing the applet and returns it. I can see all this happening watching the programs and various monitors I have running (such as the http monitor). This is all working as expected. On my desktop, with exactly this setup, everything works as long as I restrict myself to http. If I try https, everything gives the appearance of working, and in the http monitor I can see the https requests being made and the appropriate files being returned. But for some reason, the file is not displayed where exactly the same file is displayed if it is requested using the http protocol. On my notebook, in the second reconstruction, again it all seems to be OK except that JEditorPane is not generating the hyperlink requests. The first page is retrieved using https from within the initialization function, and properly displayed. And the cursor even changes to the hand with a pointing finger when it is over the hyperlink, but the hyperlink event is not generated and we don't get into my even handler.
    Is this clearer, or does it generate any more ideas as to what to look at and where?
    Thanks,
    Ted

  • Remove Html textarea scrollbar from jeditorpane

    Hi,
    I am using jeditorpane for display a content in my project,
    i am create html code and set to jeditorpane, but in my code i am using textarea for display large text,
    what my problem is in the textarea is not at all wrap and even small text also its show scrollbar,
    i want to remove the scrollbar and wrap properly, can any one give some idea is highly useful to solve my problem.
    my code is
            setContentType("text/html"_);
              HTMLEditorKit kit = new HTMLEditorKit();
              super.setEditorKit(kit);
              StyleSheet styleSheet = kit.getStyleSheet();
              styleSheet.addRule("textarea {style=border:4; overflow:auto; wrap:virtual}");
              styleSheet.addRule("body {color:#000; font-family:times; margin: 1px }");
              StringBuffer sb = new StringBuffer();
            // in this string buffer i am append all the html code
             setText( sb.toString() );Thanks in advance.

    This is the technique I use.
    1. Create 2 identical columns, one with the HTML and one without.
    2. Then conditionally display the columns, one to display in the web page and the other to display in the download. This can easily be done using the request value e.g.
    Condition Type: Request Is NOT Contained within Expression 1
    Expression1: CSV,PDF,RTF,XLS
    I hope that does the trick for you :)
    Simom

  • Problem using the setPage(String url) of JEditorPane

    Hi all !
    I'm developping a text file generator which generates a text file and use a viewer to display the content of this text file.
    The first time, it works correctly, it displays the text file content but the others times it doesn't work correctly, the first text file content remains displayed.
    It seems that the setpage(String url) method doesn't work correctly.
    Does anyone know this problem ?
    In advance, thanks a lot.
    Best regards,
    Farid.
    Here is the code of the viewer:
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.lang.*;
    public class ViewerQCM extends JPanel {
         private JPanel panelSouth;
         private JLabel titreLabel;
         private JButton genererQCMButton;
         private JEditorPane editorPane;
         private JScrollPane scrollPane;
         public ViewerQCM() {
              JFrame frame = new JFrame("G�n�rateur de QCM");
              setLayout(new BorderLayout());
              panelSouth = new JPanel();
              panelSouth.setLayout(new FlowLayout());
    titreLabel = new JLabel("G�n�rateur de QCM", SwingConstants.CENTER);
              editorPane = new JEditorPane();
              editorPane.setContentType("text/plain");
    editorPane.setText("Cliquer sur le bouton \" G�n�rer QCM \" ");
              editorPane.setEditable(false);
              genererQCMButton = new JButton("G�n�rer QCM");
              genererQCMButton.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
              GenerateurDeQCM.getInstance().init();
              GenerateurDeQCM.getInstance().generateQuestionnaire();
                        try {
    editorPane.setPage("file:" + AccesBase.getString("generateur.QCM"));
                        catch (IOException ex) {
                             ex.printStackTrace();
    LogFile.getInstance().write("Exception *** IOException caught in constructor ViewerQCM() ***");
                   LogFile.getInstance().write(ex.getMessage());
                   LogFile.getInstance().flush();
              scrollPane = new JScrollPane(editorPane);
              add(titreLabel, BorderLayout.NORTH);
              add(scrollPane, BorderLayout.CENTER);
              panelSouth.add(genererQCMButton);
              add(panelSouth, BorderLayout.SOUTH);
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.getContentPane().add(this);
    frame.pack();
    frame.setSize(500,600);
    frame.setVisible(true);
         public static void main(String args[]) {
              new ViewerQCM();
    }

    hi,
    there is some problem with JedtorPane when you update the page. Image or not updated all the time because the buffer keep the old image and does not update it. The problem is that class got to much protected field so you cannot change nothing. It is a bug since Two years and no body as correct it.

Maybe you are looking for