Class HtmlPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable

public class HtmlPanel extends JEditorPane

Name: HtmlPanel

Description: An HTML browser that shows a given URL. Links are opened in the same window if have the same path, otherwise will be opened in system browser.

Date: 29/gen/07 Time: 17:37:49

Version:
1.0
Author:
Bertoli Marco
See Also:
  • Constructor Details

    • HtmlPanel

      public HtmlPanel()
      Builds a new HtmlPanel
    • HtmlPanel

      public HtmlPanel(URL url)
      Builds a new HtmlPanel that shows given url
      Parameters:
      url - url of the page to be displayed
  • Method Details

    • setURL

      public void setURL(URL url)
      Sets the page to be displayed in the panel
      Parameters:
      url - url of the page to be displayed
    • setAntiAliasing

      public void setAntiAliasing(boolean use)
      Tells to use antialiasing to draw html text. Default is false.
      Parameters:
      use - true to use antialiasing, false otherwise.
    • isAntiAliasing

      public boolean isAntiAliasing()
      Tells if antialiasing is used to draw html text. Default is false.
      Returns:
      true if antialiasing is used.
    • paintComponent

      protected void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent