Viewing JavaDoc HTML files inside a JFrame

hi all,
how can I display any of JavaDoc HTML files (as overview-summary.html or index.html) inside a JFrame?
in addition, the user should be able to use hyperlinks.
I used JEditorPane, but in it I can't use hyperlinks.
thanks for your answers. :)

Hey thats something like a bew browser right if you want to i can send you an example for you but i'm curious you want to use JFileChooser or just open the html page like internet and provide links however send me a message to [email protected] to send you the example and watch if it works for you

Similar Messages

  • Open an html file inside spry collapsible panel

    Greetings,
    Using CS5
    Does anyone know the CSS code/possibility of opening an html file inside the Spry panel?
    I've tried the following code:
    .CollapsiblePanelContent {
        background-image: url(lookoutgraph.html);
    Is there a better CSS element for calling up an html file?
    For what it's worth...the html file I'm tring to open uses a <canvas> tag. When opened by itself, the html file has no problem opening and displaying the canvas data.
    Much Thanks!

    With the exeption of images, to add external content to a document you will need to make use of either serverside or clientside code.
    Have a look at the SpryHTMLPanel here http://labs.adobe.com/technologies/spry/samples/htmlpanel/html_panel_sample.html
    Otherwise, please supply a link to your site so that we can come up with alternatives.
    Gramps

  • Viewing an HTML file in a portlet &

    Dear reader:
    I need to view an HTML file in a portlet according to a specified parameter passed via URL address, can i use url.display_url or not, and how? and if not what should i use?
    and related to that how can i call a portlet (or a page published as portlet)to override an existing one (programatically)?
    thank you for your time.

    Check out the multi page portlet in the February PDK for an example of how to display a second portlet in place of the first portlet. As for your first question, please try posting your question to the Oracle Portal Development Kit (PDK) forum, where you'll find the expertise you require.

  • How to create thumbnail view for html files

    hi,
    I want to create thumbnail view for html files, not for image files.. can we treat html files as images..
    Anybody help me..

    You can right click on your Desktop and select New Folder.  In Finder File > New Folder should work too, not in front of my Mac.
    Welcome to back by the way.  You might find these websites helpful.
    Switch 101
    Mac 101

  • Opening html files inside jar

    Hi,
    I'm making a program where i have a set of help files in the form of html and i would like to open them when the user clicks the "Help" button and I used this code at first
    try
         Desktop.getDesktop().browse(new URI("resources/html/help.html"));
    catch (Exception ex)
         JOptionPane.showMessageDialog(null, "Could not open help.html in default browser\n", "Error", JOptionPane.ERROR_MESSAGE);
    }However after I made the jar and tried to execute on another computer however, it wouldn't work and would display the error message. I was wondering if there was some way that I could open the help.html in their default browser, or maybe a frame if that works, from the jar and have my program still be platform independent?

    ok so i just realized that it doesn't make sense for a program outside the jar, like IE or Firefox, to be able to access and open a file inside of the jar. I am now looking for suggestions on how to work around this problem for my program to be able to have a simple help system located inside the jar that can be loaded during runtime.
    Thanks for your suggestions.

  • View local html files

    Does anyone here know how to view html files which are stored locally on iPhone?
    Thanks

    Unfortunately, iPhone Safari doesn't support the "file://" protocol.
    Not having local storage of web apps was, and is, a big limitation.
    Some companies I contract to, have large business apps written under IE6 on handheld Windows CE devices. The apps are stored on the device. When the iPhone (and Safari Windows) came out, we thought about modifying them to run under Safari. The limitation stopped that idea.

  • Import Links from JavaDocs HTML Files

    When I import HTML files from JavaDoc with internal links
    into RoboHelp, they come in with broken links. Internal HTML links
    have # signs in their bookmarks & Robo7 does not like them. How
    can I get Robo to accept these internal embedded HTML links?

    See
    here
    for a duplicate thread.

  • Print HTML file inside JEditorPane

    Hi Guys,
    I'm trying to print the contents of a JEditorPane - actually, a html file that I read and display in that component from the underlying file system. I've had the class that manages the JEditorPane implement Printable - the following is my print() implementation:
    public int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
              throws PrinterException {
              if (pageIndex > 0) {
                   return (NO_SUCH_PAGE);
              } else {
                   Graphics2D g2d = (Graphics2D) graphics;
                   g2d.translate(
                        pageFormat.getImageableX(),
                        pageFormat.getImageableY());
                   ivTextArea.paint(g2d);
                   return (PAGE_EXISTS);
    }I've got another method that gets called when a print button is clicked:
    class .... {
      PrintJob pj;
      PageFormat pf;
    private void printMe() {
               if (pj == null) {
                   pj = PrinterJob.getPrinterJob();
                   pf = pj.defaultPage();
                   pf.setOrientation(PageFormat.PORTRAIT);
              pf = pj.pageDialog(pf);
              pj.setPrintable(this, pf);
              try {
                   pj.print();
              } catch (PrinterException e) {
                   throw new RuntimeException(e);
    }Clearly I'm doing smth wrong, since only a single page gets printed and moreover the formatting is awful [text gets cut instead of moving on the next line]. Can someone help?
    Thanks much!

              if (pageIndex > 0) {
                   return (NO_SUCH_PAGE);This is why you only get a single page.
    page gets printed and moreover the formatting is
    awful [text gets cut instead of moving on the next
    line]. Can someone help?Yeah. Your best bet is either to put the editorpane in a scrollpane and just print what's visible, OR, you can take the print graphics object, convert it into a graphics2D object, and call scale on that by comparing component.getWidth/height to PageFormat.getImageableWidth/Height
    I'm attaching my StandardPrint class. It uses the pageable interface to carry the number of pages + page format as well. I'm not sure if I did the scaling here or not, but I've done it before so I know it works :-) Also, I've got methods for previewing the print, which can save a lot of paper.
    Please feel free to have and use this class, but please do not change the package or portray this as your own work
    =============================
    package tjacobs.print;
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.awt.print.*;
    import javax.print.PrintException;
    public class StandardPrint implements Printable, Pageable {
        Component c;
        SpecialPrint sp;
        PageFormat mFormat;
        public StandardPrint(Component c) {
            this.c = c;
            if (c instanceof SpecialPrint) {
                sp = (SpecialPrint)c;
        public StandardPrint(SpecialPrint sp) {
            this.sp = sp;
        public void start() throws PrinterException {
            PrinterJob job = PrinterJob.getPrinterJob();
            if (mFormat == null) {
                mFormat = job.defaultPage();
            job.setPageable(this);
            if (job.printDialog()) {
                job.print();
        public void setPageFormat (PageFormat pf) {
            mFormat = pf;
        public void printStandardComponent (Pageable p) throws PrinterException {
            PrinterJob job = PrinterJob.getPrinterJob();
            job.setPageable(p);
            job.print();
        private Dimension getJobSize() {
            if (sp != null) {
                return sp.getPrintSize();
            else {
                return c.getSize();
        public static Image preview (int width, int height, Printable sp, PageFormat pf, int pageNo) {
            BufferedImage im = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
            return preview (im, sp, pf, pageNo);
        public static Image preview (Image im, Printable sp, PageFormat pf, int pageNo) {
            Graphics2D g = (Graphics2D) im.getGraphics();
    //        PageFormat pf = sp.getPageFormat(pageNo);
    //        int width = im.getWidth(null);
    //        int height = im.getHeight(null);
    //        g.setColor(Color.WHITE);
    //        g.fillRect(0, 0, width, height);
    //        double hratio = height / pf.getHeight();
    //        double wratio = width / pf.getWidth();
    //        g.scale(hratio, wratio);
            try {
                   sp.print(g, pf, pageNo);
              catch(PrinterException pe) {
                   pe.printStackTrace();
            g.dispose();
            return im;
        public int print(Graphics gr, PageFormat format, int pageNo) {
            mFormat = format;
            Graphics2D g = (Graphics2D) gr;
            g.translate((int)format.getImageableX(), (int)format.getImageableY());
            Dimension size = getJobSize();
            if (pageNo > getNumberOfPages()) {
                return Printable.NO_SUCH_PAGE;
            int horizontal = getNumHorizontalPages();
            int vertical = getNumVerticalPages();
            int horizontalOffset = (int) ((pageNo % horizontal) * format.getImageableWidth());
            int verticalOffset = (int) ((pageNo / vertical) * format.getImageableHeight());
            double ratio = getScreenRatio();
            g.scale(1 / ratio, 1 / ratio);
            g.translate(-horizontal, -vertical);
            if (sp != null) {
                sp.printerPaint(g);
            else {
                c.paint(g);
            g.translate(horizontal, vertical);
            g.scale(ratio, ratio);
            g.translate((int)-format.getImageableX(), (int)-format.getImageableY());
            return Printable.PAGE_EXISTS;
        public int getNumHorizontalPages() {
            Dimension size = getJobSize();
            int imWidth = (int)mFormat.getImageableWidth();
            int pWidth = 1 + (int)(size.width / getScreenRatio() / imWidth) - (imWidth == size.width ? 1 : 0);
            return pWidth;
        private double getScreenRatio () {
            double res = Toolkit.getDefaultToolkit().getScreenResolution();
            double ratio = res / 72.0;
            return ratio;
        public int getNumVerticalPages() {
            Dimension size = getJobSize();
            int imHeight = (int)mFormat.getImageableHeight();
            int pHeight = (int) (1 + (size.height / getScreenRatio() / imHeight)) - (imHeight == size.height ? 1 : 0);
            return pHeight;
        public int getNumberOfPages() {
            return getNumHorizontalPages() * getNumVerticalPages();
        public Printable getPrintable(int i) {
            return this;
        public PageFormat getPageFormat(int page) {
            if (mFormat == null) {
                PrinterJob job = PrinterJob.getPrinterJob();
                mFormat = job.defaultPage();
            return mFormat;
    }>
    Thanks much!

  • Stroke/Border Disappears When Viewing on HTML File

    Hello -
    I am using Flash CS5.5. 
    I am working on Flash banners and I want to place a 1 pixel stroke/border around each banner.
    I did the usual, created a new layer, used the rectangle tool, put in the correct stroke number (1 pixel), matched the size to the banner and aligned it correctly, etc.  The stroke is the exact dimensions of the banner/movie and the stroke is on the top layer.
    When I Preview/Test the banners within Flash the stroke/border looks fine.  However, after I publish and I view the published SWF and also separately on a HTML page, the border/stroke does not show up on the right side and on the bottom.
    If I change the stroke to 2 pixels (from 1 pixel), then the right side shows up but the bottom still does not.
    Any ideas why this is happening? 
    Thanks!!!

    Well I found the answer here:  http://furizu.net/blog/2009/08/the-myth-about-flash-border/#more-312
    Not sure why it has to be done this way but it works.  If anyone else has other solutions I am still interested.
    Thanks

  • Viewing HTML file

    i don't know how to view an html file, is there a command that let me call the explorer and load the file ?
    or is there a container or a class that shows html files ?
    thanks

    Creating HTML through Microsoft Word is not a good idea, it has to create the worst HTML I have ever seen. However to get your links working you will need to write a hyperlink listener. Theres an example in the javaDoc for JEditorPane http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/JEditorPane.html

  • How to view pdf files inside firefox?

    I spent hours on this. pdf.js sucks ass. Neither foxit nor adobe reader works. I have been using firefox since 2.0.0.20. I will have to quit if I can't view the pdf files inside my browser! The worst thing that has ever happened to firefox is the pdf.js shit. It is slow as shit and useless like shit. Just let pdf files be handled by the pdf program.

    hello, please refer to [[How to disable the built-in PDF viewer and use another viewer]]

  • Play a flash file inside a container or component like jframe or jpanel

    sir ,
    i want to embed a flash file inside a jframe or jpanel,
    is it possible ,please give me related reference of URL providing
    plugin for this.
    i will be very thankful for this great help.
    it is very importent for me.
    bye

    I think JMF will support flash files.

  • Viewing HTML files and Overriding a portlet

    Dear reader:
    I need to view an HTML file in a portlet according to a specified parameter passed via URL address, can i use url.display_url or not, and how? and if not what should i use?
    and related to that how can i call a portlet (or a page published as portlet)to override an existing one (programatically)?
    thank you for your time.

    To bring in content from another url, I've used code similar to the following within a Dynamic Page portlet with alot of success...
    <html>
    <table>
    <tr><td>
    <iframe
    src="http://www.domain.com/blablabla" noresize hspace="0" vspace="0" frameborder="0"
    marginheight="0" marginwidth="0" width="620" height="400">
    </iframe>
    </td>
    </tr>
    </table>
    </html>

  • How Can i open Html file in a Browser from Jar file

    Hi
    i am having Html help files inside my Jar file ... if i use
    getclass().getRource("\lib\start.html");
    it is not opening ... so i have to ship seperate folders for html files along with jar files.... can anyone give the solution to have(open) html files inside the jar file and to open then in a default browser of any OS
    Regards
    Ganesan S

    the follwing method i have used to open html file ...
    so to access html file i am shipping resources folder with jar file ..
    private void openHtmlPages(String pageName) {
         String cmd[] = new String[2];
         String browser = null;
         File file = null;
         if(System.getProperty("os.name").indexOf("Linux")>-1) {
              file = new File("/usr/bin/mozilla");
              if(!file.exists() ) {
              }else     {
                   browser = "mozilla";
         }else {
              browser = "<path of iexplore>";
         cmd[0] = browser;
         File files = new File("");
         String metaData = "/resources/Help/Files/"+pageName+".html"; // folder inside jar file
         java.net.URL url = this.getClass().getResource(metaData);
         String fileName = url.getFile();
         fileName = fileName.replaceAll("file:/","");
         fileName = fileName.replaceAll("%2520"," ");
         fileName = fileName.replaceAll("%20"," ");
         fileName = fileName.replaceAll("jarfilename.jar!"," ").trim();
         cmd[1] = fileName;     
         try{
              Process p = Runtime.getRuntime().exec(cmd);
         }catch(java.io.IOException io){
                   //Ignore
    can anyone give me the solution..???
    Regards
    Ganesan S

  • Firefox won't display a html photo inside a frame.

    in facebook, it will not display an png or html file inside a a frame. it will show only a jpg

    Do you see that missing image in Tools > Page Info > Media?
    You can access Page Info via the right-click context menu on a web page and the Tools menu (Alt+T).
    Press the F10 key or tap the Alt key to bring up the "Menu Bar" temporarily if the menu bar is hidden.

Maybe you are looking for

  • To add a new condition type in Sales order programatically

    Hello, I want to add a condition type (ZXXX) with an amount in sales order programatically. I want to add the condition type in the item. I am able to add the price (amount) and condition type (ZXXX) manually in the sales order through t code crmd_or

  • Seeking a Bridge scripter

    Hi All: I'm currently looking for a freelancer to write a quick Bridge script for me. If you could handle the job--or know someone who could--could you please shoot me a quote at [email protected]? I have some budget, and want to pay fairly. If you're int

  • Unicode Or Non-Unicode for RFC Destination.

    Hi, while creating a RFC Destination, what role does a Unicode Setting play. Should this  by default always set to Unicode. or does it vary from system to system. Is XI  Uniode compatible or not. Regards, Sita Rama Raju

  • Link IPad and IMac bookmarks

    How do I link my IMac bookmarks to the IPad?

  • BOINC and using GPU

    I instelled boinc 7.2.42-1 from the community repo and followed the wiki instructions. I have new GTX750 TI GPU with nvidia 343.36-2 drivers, so I thought that I harness it to do computations also. This is the info boinc gives me while starting: Fri