How to get the HTML page size displayed in JEditorPane

Hi All,
I'm using a JEditorPane object in order to view/display an HTML page. The nature fo my program is that it does not know the size of the page in advance, but only on runtime. I'd like to get the size of the HTML page in order to determine the frame size according to the size of the HTML page.
Is there a way to get the size of the HTML page from the JEditorPane?
Thanks.

after displaying the page in your editor pane you can get the diamension for the page by calling
JComponent class method getSize();
actually your question is not so clear
use the JScroll pane then you don't need to worry about the size of the page.

Similar Messages

  • How to get the HTML data formatted display using the Rrt template

    hi,
    I have a table which has data with html tags in it.
    eg as shown below.
    sample text is as follows:
    <BR>
    <b>MY TEST HERE HAS SOME BOLD TEXT IN IT. THIS WHOLE LINE SHOULD BE BOLD</b><br>and the rest of the text will not be bold.
    <BR><br>
    now I want to be able to display this text with the proper format using BI publisher / rt template.
    my report shows the tags as is instead of being formatted.
    please let me know how i can fix this
    Thanks
    knut

    http://blogs.oracle.com/xmlpublisher/2007/01/02.

  • How to get the current page URL

    HI All
    I am working in oracle apps 4.0
    I have one page called history in that i have one page item called Application url. My application id is 122 but its a copy of application 106
    How to get the current page url for the page item.
    Any steps should be help ful
    Thanks & Regards
    Srikkanth.M

    I'm not 100% clear on what the requirement is from the description, however it does sound like you are making things unnecessarily complicated.
    If you want permanent/ID-independent links then use application and page aliases.
    so here we used to display the url like this: <tt>{noformat}http://81.131.254.171:8080/apex/f?p=122{noformat}</tt>
    Do you mean that the URL is displayed like that? If so that doesn't seem particularly helpful. How is anyone supposed to know what it is?
    There are many ways to provide links in APEX&mdash;including lists and nav bars.
    Where the link is to another resource located on the same server (such as another page in the same app, or a different app in the workspace), relative addressing can be used, making it unecessary to include scheme, domain and port information in the URL. For example, if the page to be linked to has a page alias <tt>ABOUT</tt> in an application with alias <tt>UNITY</tt>, and the apps share an authentication scheme/cookie to permit shared sessions, then the link URL is simply
    f?p=UNITY:ABOUT:&APP_SESSION.

  • How to get the total pages in ALV report?

    Hi guys,
    Since I used page breaks can somebody please help me on how to get the total pages in ALV report?sincerely please...thanks guys.

    automatic display total page.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    r

  • How to get the Empty page in Webi report

    Hi,
    I have to insert the charts in the report but i don't have the space to insert the charts in same page so i need one more page how to get the blank page in report
    thanks,

    turn your report from Page Layout to Draft Mode. Than you will be able to insert chart in it.
    You can view Web Intelligence reports in different modes depending on how you want to work with data and how you want the data to appear.
    1. In Web Intelligence Interactive, select the report tab of the report you want to view.
    2. Click the arrow next to the View button on the main toolbar above the report.
    3. Select the viewing mode.
    4. In the Java Report Panel or Web Intelligence Rich Client, use Switch Page/Quick Display on the Reporting toolbar to alternate between Page mode and Quick Display mode.
    Edited by: srrachna on Apr 22, 2011 2:25 PM

  • How to get the Portal Page name from PLSQL?

    Can anyone tell me how to get the portal page name from my dynamic page using plsql?
    Apparently you can get the page id and work it out from there, but my calls to get the page id are not returning any values anyway.
    My code for attempting to get the page id is below.
    <oracle>
    declare
    v_pageid varchar2(30);
    begin
    v_pageid := wwpro_api_parameters.get_value('_pageid', '/pls/portal30');
    htp.print('Page is '|| v_pageid);
    end;
    </oracle>
    Ideally I'd actually just like to get the page name. Is there a straightforward way to do this?
    Thanks in advance!
    Sarah

    Few clarifications -
    1. wwpro_api_parameters cannot be used to get default portal
    page parameters such as '_pageid', '_dad', '_schema' etc.,
    2. Page information can be obtained through any components which
    are available in that particular page. For example, in case of
    dynamic page, we need to publish it as a portlet and add it to the
    page. This process creates necessary packages in the DB, but we
    will not have access to the portlet methods.
    So, I would prefer creating a simple DB provider & portlet and access
    page title from its show method as follows -
    //Declare local variable l_page_id, l_page_title as varchar2
    select page_id into l_page_id from wwpob_portlet_instance$ where
    portlet_id = p_portlet_record.portlet_id and
    provider_id = p_portlet_record.provider_id;
    select name into l_page_title from wwpob_page$ where id=l_page_id;
    More information on DB provider can be found at
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/understanding.database.providers.html
    Secondly, usage of wwpro_api_parameters.get_value method is
    incorrect. This method expects two arguments -
    <ul>
    <li><b>p_name : </b> The name of the parameter to be returned.</li>
    <li><b>p_reference_path : </b> An unique identifier for a portlet instance on the current page.</li>
    </ul>
    p_reference_path would be something like 99_SNOOP_PORTLET_76535103 and not some type of path as its name suggests.
    The following code fragment fetches all parameters available
    for a portlet.
    Note : Copy this code into 'show' method of your portlet.
    //Declare l_names, l_values as owa.vc_arr
    * Retreive all of the names of parameters for this portlet
    l_names := wwpro_api_parameters.get_names(
    p_reference_path=>p_portlet_record.reference_path);
    * Retreive all of the values of parameters for this portlet
    l_values := wwpro_api_parameters.get_values(p_names=>l_names,
    p_reference_path=>p_portlet_record.reference_path);
    //Loop through these arrays to get parameter information
    htp.p('<center><table BORDER COLS=2 WIDTH="90%" >');
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(wwui_api_portlet.portlet_heading('Name',1));
    htp.tableData(wwui_api_portlet.portlet_heading('Value',1));
    htp.tableRowClose;
    if l_names.count = 0 then
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.p('<td COLSPAN="2">'
    ||wwui_api_portlet.portlet_text(
    'No portlet parameters were passed on the URL.',1)
    ||'</td>');
    htp.tableRowClose;
    else
    for i in 1..l_names.count loop
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(l_names(i));
    htp.tableData(l_values(i));
    htp.tableRowClose;
    end loop;
    end if;
    htp.p('</table></center>');
    Hope it helps...
    -aMJAD.

  • How to change the default window size display font size on Lync 2013 main window?

    Hi champs,
    Just a simple non-technical question: How to change the default window size display font size on Lync 2013 main window on Windows 7 desktop?
    Thanks,

    Hi,
    Did you mean change the Lync: Change the Default Font and Color of Instant Messages just as Edwin said above?
    If not, as I know, there is no natural way to change it.
    If yes, on the latest version of Lync 2013 client, there is a new option “IM” on Lync client “Options” list. And you need to change the default Font and Color of IM in the interface of “IM”.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • How to get the last page  SAP Script form

    How to get the last page  SAP Script form.
    I want to print a specific information in the last page of SAP form (Script). Please tell me how to get the last page number.
    Regards

    Hi
    You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.
    From SAP Help:
    This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .
    Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.
    /: IF &NEXTPAGE& = '0'
       Last page
    /: ENDIF
    Max

  • How to get the jsp page name in jsp?

    how to get the jsp page name in jsp? how the jsp get the jsp page name dynamic.
    thanks in advance.

    Try request.getServletPath()

  • How to get the html source for these web page ?

    My code work well for standart page, but I'm unable to get the html source from these page with my vb program :
    http://www.slashdot.org
    http://userfriendly.org
    http://segfault.org
    here my code
    private sub commandgethtml_Click ()
    Inet1.Cancel
    Inet1.Protocol = icHTTP
    Inet1.URL = theURL
    HTMLcode = Inet1.OpenURL(theURL, icString)
    RichTextBox1.Text = HTMLcode
    end sub
    thanks in advance.

    Hello Cyrano,
    This Developer Forum focuses on the National Instruments product "Measurement Studio for Visual Basic" (formerly known as ComponentWorks). Our goal is to help people to better integrate this product into their test, measurement, and automation applications. Your question directly pertains to the Microsoft Internet Transfer Control. I think you would find an increased number of responses that are better focused on your question if you would repost it to a forum that specializes in general VB and internet programming. Good luck!
    Jeremiah Cox
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • How to get the actual screen size

    Hi,
    I have to get the actual screen size of the cliend in an applet, if i use method
    Dimension dmx = Toolkit.getDefaultToolkit().getScreenSize();
    it does not gives the actual screen size, like the screen size will be different if the application bar ( where we have start button on windows ) is Auto hide, and will be different it is not Auto Hide, or some users ike to keep the application bar on right or left of screen or on top..
    So how do we get the actual display size of screen

    Hi,
    I got how to do if using applet
    in screen object of java script we have methods to get the available width and availabe size
    screen.availWidth
    screen.availHeight
    here is the link for more info
    http://developer.netscape.com/docs/manuals/js/client/jsref/screen.htm
    http://forum.java.sun.com/thread.jsp?thread=275329&forum=57&message=1063410

  • How to get the current Mailbox size

    Hi,
    Does anyone know how to get the current size of Mailbox and Archive by using GW api?

    Originally Posted by NanLau
    Hi,
    Does anyone know how to get the current size of Mailbox and Archive by using GW api?
    Can anyone answer this? Thanks.

  • How to get the cropped page content

    Consider an A4 size pdf is cropped in Bottom and Right edges.
    If the user wants to open the pdf as A4 size then we are passing the rectangle size A4 to PDPage.DrawEx() method to get the page content.
    When we use like this, we are getting the full page content but our requirement is to get the cropped page content.
    Is there any way to get the cropped portion alone by passing the rectangle size as A4 to PDPage.DrawEx() method.
    But it is working fine for Left and Top edge cropping

    Have a look at this document:
    http://partners.adobe.com/public/developer/en/acrobat/sdk/AcroJSGuide.pdf
    go to the index and search for the term "Crop" or "Cropping" which has a hyperlink for page 70.  There you will find some JavaScript options for cropping the page from all sides which can then be saved using some other methods in the document.  I'm not sure, though, if JavaScript is what you're looking for.

  • How to get the personal folder size

    Hi,
    I'm trying to develop a method for define the maximum size of personal documents folder. I'm changing the Upload Command, and I want to know if its possible to get the current size of the personal documents folder for the user that is trying to upload the document.
    For this moment, I've got the current UserID, and I have created an RID with the path "userhome/UserID/Personal Documents", but now I don't know how to get the size of this folder!!!!
    Thanks to all.
    Arnau Rovira

    Originally Posted by NanLau
    Hi,
    Does anyone know how to get the current size of Mailbox and Archive by using GW api?
    Can anyone answer this? Thanks.

  • How to get the HTML Source code from the active browser ?

    Hi All,
    I need to get the HTML Source code from the active browser (IE). I tried with the below code, but I am not able to get the Source code all the time, with respect to the different applications (http or https) and the user authentication has to be changes in few applications (_I dont know or not able to given that in the below code_). More over there is also a dependence of the URL to get the HTML Source code.
    Therefore what I feel is getting the HTML Source code from the given or active browser will be consistent than the URL. Since the Source code is available in the browser (IE) . Please help me with a sample code to achieve this . . . !
    HTMLDocument doc=(HTMLDocument) kit.createDefaultDocument();
    doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);
    URL url = new URL(strURL);
    Reader HTMLReader = new InputStreamReader(url.openConnection().getInputStream());
    kit.read(HTMLReader, doc, 0);Thanks in advance,
    Regards,
    Jothi Venkatachalam
    Edited by: j0o on May 7, 2009 3:11 AM

    The simple answer is: you don't.
    Not only is it simply not possible, but the entire concept of "the active browser" doesn't exist.
    You were on the right track with your code to retrieve the page directly from the server, but as you noticed that code will only work for regular http connections.
    For https and other protocols you will need to use appropriate libraries for each protocol. Something like Apache Commons can help you with that. There are networking libraries in there for a lot of commonly used protocols.

Maybe you are looking for

  • How to close popup with af:commandButton without submitting values?

    Hi all, I'm using JDeveloper 11.1.2.1 My popup has few af:inputText components with value attribute binded to view scope variables. I set those view scope variables in backing bean before showing popup. When I change values of input fields and click

  • Printer icon stays in dock even with auto quit enabled

    The printer icon remains in the dock when printing is finished, even with the auto quit option checked. I am using an HP deskjet 5650. This behavior has only recently started. How do I make the icon go away automatically? I've checked and unchecked t

  • BO XI3.1 sp3 server installation

    We are planning to upgrade BO XIR2 to BO XI 3.1 sp3 version. Approach: We will install BO XI 3.1 sp3 on the same server where BO XIR2 is currently installed in a new disk.After successful upgrade we will uninstall BO XIR2 version. Will there be any i

  • Updateable Report Question.

    Updateable Report Question. Currently I am developing an XE application, so I think that is apex 2.0. Here is an example of what I wish to achieve. Suppose I have an emp table with columns dept, id, name and comment. I create an SQL report as SELECT

  • How do i undo having firefox as my default browser?

    i mistakenly clicked having firefox as my default. i want to undo it.