Displaying a webpage in a JEditorPane from a JApplet

Hi.
I am trying to display a webpage in a JEditorPane from an a JApplet.
I've tried.
try {
        URL url = new URL("http://www.yahoo.com");
        jEditorPane1.setPage(url);
        } catch(Exception e) {e.printStackTrace();}But I got an AccessControlException:
java.lang.RuntimeException: java.security.AccessControlException: access denied (java.net.SocketPermission www.yahoo.com:80 connect,resolve)
     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
     at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
     at java.net.HttpURLConnection.getResponseCode(Unknown Source)
     at javax.swing.JEditorPane.getStream(Unknown Source)
     at javax.swing.JEditorPane.setPage(Unknown Source)
     at DisplayDialog.<init>(DisplayDialog.java:21)
     at TestFrame.jButton2ActionPerformed(TestFrame.java:477)
     at TestFrame.access$200(TestFrame.java:15)
     at TestFrame$3.actionPerformed(TestFrame.java:432)
     at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
     at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at javax.swing.JComponent.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Window.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission www.yahoo.com:80 connect,resolve)
     at java.security.AccessControlContext.checkPermission(Unknown Source)
     at java.security.AccessController.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkConnect(Unknown Source)
     at sun.net.www.http.HttpClient.openServer(Unknown Source)
     at sun.net.www.http.HttpClient.<init>(Unknown Source)
     at sun.net.www.http.HttpClient.New(Unknown Source)
     at sun.net.www.http.HttpClient.New(Unknown Source)
     at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
     at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
     at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
     ... 31 more
I seem to recall something about an applet only being allowed to access pages on the same server. Is there any way to display an external webpage in a JEditorPane? Thanks.

Unless you sign the applet's jar, you can only fetch urls from the same host as the applet was downloaded from. Part of the sandbox security restrictions.
So go look up jarsigner for details.

Similar Messages

  • Problem displaying JDialog from a JApplet

    When I try to display a JDialog (of a JFrame) from a JApplet, the dialog is displayed but it never receives any paint events, so the form seems empty.
    Basically, this is what happens:
    A JPanel is added to the content pane of a JApplet.
    When that panel receives a mouse action event, a new window is created like this:
    TestWindow tw = new TestWindow();
    tw.setVisible();That's it. When the window is started from a method in the applet itself, however (init() for example) the window does display correctly.
    Can anyone tell me what might be going wrong?

    /*  <applet code="AppletDialog" width="300" height="180"></applet>
    *  use: >appletviewer AppletDialog.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class AppletDialog extends JApplet
        JDialog dialog;
        public void init()
            initDialog();
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(getNorthPanel(), "North");
            getContentPane().add(getSouthPanel(), "South");
        private void initDialog()
            JLabel label = new JLabel("dialog contents", JLabel.CENTER);
            dialog = new JDialog(new Frame(), false);
            dialog.getContentPane().add(label);
            dialog.setSize(200,100);
            dialog.setLocation(540,200);
        private JPanel getNorthPanel()
            JButton launch = new JButton("show dialog");
            launch.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    dialog.setTitle("from button");
                    dialog.setVisible(true);
            JPanel panel = new JPanel();
            panel.add(launch);
            return panel;
        private JPanel getSouthPanel()
            JPanel panel = new JPanel(new BorderLayout());
            panel.setBackground(Color.pink);
            panel.add(new JLabel("click here for dialog", JLabel.CENTER));
            Dimension d = panel.getPreferredSize();
            d.height = 45;
            panel.setPreferredSize(d);
            panel.addMouseListener(new MouseAdapter()
                public void mousePressed(MouseEvent e)
                    dialog.setTitle("from mouse");
                    dialog.setVisible(true);
            return panel;
        public static void main(String[] args)
            JApplet applet = new AppletDialog();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(applet);
            f.setSize(300,180);
            f.setLocation(200,200);
            applet.init();
            f.setVisible(true);
    }

  • Error message "This program cannot display the webpage when uploading images to Cafe Press

    I have had a Café Press shop for five years and except for sometimes being slow, no problems uploading images. Now, suddenly for 3 days I get the message "This program cannot display the webpage
    Most likely causes:
    • You are not connected to the Internet.
    • The website is encountering problems.
    • There might be a typing error in the address.
    What you can try:
    Check your Internet connection. Try visiting another website to make sure you are connected.
    Retype the address."
    I got the messsage about half way through the uploading of an image. People suggested using "firefox" instead of IE so I now get a similar error message from Firefox. I signed in, clicked on the image I wanted to upload and hit "upload" and get message as follows:
    Server not found
    Firefox can't find the server at members.cafepress.com.
    * Check the address for typing errors such as
    ww.example.com instead of
    [url=http://www.example.com]www.example.com[/url]
    * If you are unable to load any pages, check your computer's network connection.
    * If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
    None of this makes sense because I WAS connected to the internet (obviously) or I wouldn't have been able to sign in, go to my media basket, browse for the image and click "upload" and watch as the progress bar showed percentage of upload such as 20%, etc. and even went to 100% at times before giving me the error message. Plus I couldn't make a typing error since I wasn't typing anything but uploading an image. Any suggestions?
    Whatever your suggestion, I need step by step instructions as I am totally computer illiterate. I don't even know what a "proxy" is and don't know if I have a "firewall" as the message suggests. I have "Comodo" security and am using Windows XP.
    I contacted CP which was no help at all. All they did was tell me to clear my cache which I do after every session. Thanks
    Nancy
    http://www.cafepress.com/calendarflr

    Sounds like your desktop application is in fact running from
    a server. CHMs were identified as a security risk by Microsoft and
    are best suited to the user's PC.
    Click
    here for more information.

  • Internet Explorer7 cannot display the Webpage in forms 10.1.2.3

    Hi all,
    I have installed forms 10.1.2.0.2 to my laptop under Windows Vista Home Premium and followed the following steps :
    1- changed virtual memory to (minimum of 2048 and maximum of 4096)
    2- I updated forms 10.1.2.0.2 it to forms 10.1.3 using pathch 3 (patch ID 5983622)
    3- I changed the application server Url in forms builder by choosing Edit, preferences, runtime and click on "Reset to default" button and added ?config=jpi at the end of the line.
    when i run the form I got the message "Internet Explorer cannot display the Webpage"
    when I called the link http://Computer_name:8889/forms/frmservlet?config=jpi
    I got a message asking me to allow downloading java plug-in 1.4.2 ( which I know that it is not certified with Vista), So i refused downloading and updated the formsweb.cfg file as Steve Cosner said in his thread Vista Jinitiator problem
    and added these new lines to the formsweb.cfg file:
    [[jdk15]]
    jpi_classid=clsid:CAFEEFAC-0015-0000-FFFF-ABCDEFFEDCBA
    jpi_codebase=http://java.sun.com/update/1.5.0/jinstall-1_5_0_12-windows-i586.cab#Version=1,5,0,12
    jpi_mimetype=application/x-java-applet;jpi-version=1.5.0_12
    jpi_download_page=http://java.sun.com/javase/downloads/index_jdk5.jsp
    baseHTML=basejpi.htm
    baseHTMLjinitiator=basejpi.htm
    baseHTMLjpi=basejpi.htm
    baseHTMLie=basejpi.htm
    When i run the form I got the same error message "internet Explorer cannot display the Webpage "
    Again I called the link : http://Computer_name:8889/forms/frmservlet?config=jpi
    then I got a message asking to allow loading and installing JRE 1.5.0_12 , and I allowed downloading and installation
    After all of this, the form doesn't run and I get the same message "Internet Explorer cannot display the Webpage "
    Is this a forms related problem or an Internet Explorer problem
    Please help
    Mostafa Abolaynain
    Edited by: Mostafa Abolaynain on Jun 5, 2009 12:06 AM

    jemar98 wrote:
    We have a custom application built alongside Oracle Ebusiness Suite 12.
    Launch a form from the Menu Navigator
    Click in any field in the form
    Focus does not change to the field that was clicked
    Focus can be retained by pressing any keyIs this issue with all custom forms or specific ones?
    Did you use the TEMPLATE.fmb file when building your custom forms?
    Can you find any errors in the JRE Console Window?
    Please obtain the FRD log file and see if you can capture more details about the error -- https://forums.oracle.com/forums/search.jspa?threadID=&q=FRD+AND+R12&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • WRT300N v1 Internet Explorer cannot display the webpage

    An intermittent problem occurs where occasionally during browsing the web I'll get an Internet Explorer "cannot display the webpage" and then I reload the page and often it works on the reload.  The problem is very frequent and so nearly every webpage I try to open I have to reload in order to access it. 
    A temporary fix is unplugging the WRT300N v1 and plugging it back in.  For a while, it works fine, but eventually the problem creeps up again.
    I have firmware v 1.03.3
    I've got two laptops, one Mac running OS 10.x and one Dell running Vista.  I also have a desktop PC running XP.  The two laptops use the wireless connection.  The PC uses a wired connection.  All 3 computers experience this same problem browsing web pages.
    I've  read the forums and mostly I've seen people talking about problems with the WRT300N v1 as far as the wireless connection, but this time I'm having issues even with the wired connection, so I feel that this issue isn't addressed, or at least I haven't found where it was addressed.
    How do I fix this issue permanently?

    I too am having the same problem. I used another system with IE7 installed and found that many sites that were "unable to be displayed" were accessed with IE7 on a differant computer system running Windows XP.
    I realize it could be a router thing as well....but after i went through all the tech help i could find online it still did not solve the problem. I decided to work it out myself.
    I found my solution when trying to go to sites with mp3 files on them.  Thats when i discovered that with Windows Vista I had to manually select what program applications would be used to perform IE7 features (webpage content) in order for the pages to load properly.
    To do this in Windows Vista - just go to Start / Program Defaults / Set Program Access and defaults  From there you can select which programs to open if IE7 cant handle the file extention on its on.  That was my problem all along.
    You may have to go as far as setting your file associations in Windows Explorer.  Windows Vista had set the file extension .php to open with Windows Photo Gallery.
    I am still going through all the file types and finding file extentions that are configured wrong within Windows Vista.
    UPDATE:  I had problems opening webpages from links from online searches that were within various forums and also on websites that required a login but popup a separate window to login to.  I don't know if you have the same problem with these sites.
    I uninstalled a Windows Update (kb927143) and can now access those.  I know this could be risky but I still have my firewall and antivirus running. Until IE7 is fixed its the only choice I have.
    To do this in Vista....go to Control Panel ... Programs and Features...then click view installed updates.  You will find it there if you have it installed.  From there you can uninstall it.
    Hope this helps you to solve your problem.
    Message Edited by nannahawktx on 08-27-2007 09:02 PM

  • ACE 4710 - Internet Explorer cannot display the webpage randomly

    We have a ACE 4710 with a basic config, (see below).
    When clicking on a tab from a window within Interent explorer we occasionally get an issue with it returning: "Internet Explorer cannot display the webpage" The details show "Access is denied" accessing a particular line of a javascript file.
    We have put one web server out of service in the farm to make sure that this isn't a result of stickyness not quite working.
    We have tested extensively by going directly to the web server directly without the load balancer and cannot reproduce the problem but we can produce the issue within a few minutes when going to the load balanced address.
    Thanks in advance for any advice.
    HOST-1/Admin# show run
    Generating configuration....
    logging enable
    logging fastpath
    logging standby
    logging timestamp
    logging trap 6
    logging history 6
    resource-class SLB_ResourceClass_T_R
      limit-resource all minimum 10.00 maximum unlimited
    resource-class sticky
      limit-resource all minimum 10.00 maximum unlimited
    boot system image:c4710ace-t1k9-mz.A5_1_2.bin
    peer hostname HOST-2
    hostname HOST-1
    interface gigabitEthernet 1/1
      switchport access vlan 1000
      no shutdown
    interface gigabitEthernet 1/2
      shutdown
    interface gigabitEthernet 1/3
      description LB003
      switchport access vlan 1
      shutdown
    interface gigabitEthernet 1/4
      description LB004
      switchport access vlan 2
      shutdown
    interface port-channel 1
      port-channel load-balance src-dst-port
      no shutdown
    clock timezone standard GMT
    switch-mode
    context Admin
      description SUTLB01
      member SLB_ResourceClass_T_R
    access-list ALL line 8 extended permit ip any any
    access-list ALL line 16 extended permit icmp any any
    access-list everyone line 8 extended permit ip any any
    access-list everyone line 16 extended permit icmp any any
    probe tcp probe_tcp_80
      port 80
    rserver host Server_S_W301
      description Server_S_W301
      ip address x.x.32.152
      inservice
    rserver host Server_S_W302
      description Server_S_W302
      ip address x.x.32.154
      inservice
    serverfarm host sfarm_T_R
      description sfarm_T_R
      predictor leastconns
      probe probe_tcp_80
      rserver Server_S_W301 80
      rserver Server_S_W302 80
        inservice
    sticky http-cookie Cookie1 T_R_sticky_cookie
      cookie insert browser-expire
      timeout 3600
      serverfarm sfarm_T_R
    class-map match-any T_R_L4Class
      2 match virtual-address x.x.33.150 tcp eq www
    class-map type management match-any remote_access
      2 match protocol xml-https any
      3 match protocol icmp any
      4 match protocol telnet any
      5 match protocol ssh any
      6 match protocol http any
      7 match protocol https any
      8 match protocol snmp any
    policy-map type management first-match remote_mgmt_allow_policy
      class remote_access
        permit
    policy-map type loadbalance first-match T_R_L7policy
      class class-default
        sticky-serverfarm T_R_sticky_cookie
    policy-map multi-match T_R_L4Policy
      class T_R_L4Class
        loadbalance vip inservice
        loadbalance policy T_R_L7policy
        loadbalance vip icmp-reply active
        nat dynamic 2 vlan 1000
    interface vlan 1000
      ip address x.x.33.148 255.255.254.0
      access-group input ALL
      nat-pool 2 x.x.33.151 x.x.33.151 netmask 255.255.254.0 pat
      service-policy input remote_mgmt_allow_policy
      service-policy input T_R_L4Policy
      no shutdown
    ip route 0.0.0.0 0.0.0.0 x.x.32.1
    ssh key rsa 1024 force

    +------------------------------------------+
    +-------------- HTTP statistics -----------+
    +------------------------------------------+
    LB parse result msgs sent : 421347     , TCP data msgs sent       : 2099597
    Inspect parse result msgs : 0          , SSL data msgs sent       : 0
                          sent
    TCP fin msgs sent         : 6169       , TCP rst msgs sent:       : 769
    Bounced fin msgs sent     : 5          , Bounced rst msgs sent:   : 1
    SSL fin msgs sent         : 0          , SSL rst msgs sent:       : 0
    Drain msgs sent           : 337811     , Particles read           : 5040829
    Reuse msgs sent           : 0          , HTTP requests            : 342499
    Reproxied requests        : 183422     , Headers removed          : 37475
    Headers inserted          : 342124     , HTTP redirects           : 0
    HTTP chunks               : 224859     , Pipelined requests       : 71466
    HTTP unproxy conns        : 267246     , Pipeline flushes         : 0
    Whitespace appends        : 0          , Second pass parsing      : 0
    Response entries recycled : 71302      , Analysis errors          : 0
    Header insert errors      : 22         , Max parselen errors      : 215
    Static parse errors       : 99         , Resource errors          : 0
    Invalid path errors       : 0          , Bad HTTP version errors  : 0
    Headers rewritten         : 0          , Header rewrite errors    : 0
    SSL headers inserted      : 0          , SSL header insert errors : 0
    SSL spoof headers deleted : 0         , Unproxy msgs sent         : 267246
    HTTP passthrough stat     : 0
    NOTE - We did turn on caching at one point to try and resolve the issue but it has since been turned off

  • Accessing https url EBS R12.1.3 leads to "Internet Explorer cannot display the webpage"

    Hi all,
    DB:11.2.0.3.0
    EBS:12.1.3
    O/S:Solaris SPARC 64 bits
    I.E Browser: 9.0
    Problem Description
    Cloned target database TEST1 from source database TEST2 RMAN full backup. But on accessing https url EBS R12.1.3 leads to "Internet Explorer cannot display the webpage"?
    Autoconfig completes successfully on both DB and Apps Tier and have also ran ojspcompile but still the same issue.
    $ perl ojspCompile.pl --compile --flush -p 2
    logfile set: /t000/test1/inst/apps/TEST1_Hostname/logs/appl/rgf/ojsp/ojsp
    starting...(compiling all)
    using 10i internal ojsp ver: 10
    synchronizing dependency file:
      loading deplist...8095
      enumerating jsps...8095
      updating dependency...0
    initializing compilation:
      eliminating children...6024 (-2071)
    translating and compiling:
      translating jsps...6024/6024 in 7m50s
      compiling jsps...6024/6024 in 35m17s
    Finished!
    Bounced the services there after still the same issue. Could anyone please share the fix if encountered such an issue before.
    Thanks for your time,
    user10088255

    Apache logs have the below entry:
    [Sun Oct 27 02:30:11 2013] [notice]  configured -- resuming normal operations
    [Sun Oct 27 02:30:11 2013] [notice] Accept mutex: fcntl (Default: fcntl)
    [Sun Oct 27 03:03:02 2013] [notice]  configured -- resuming normal operations
    [Sun Oct 27 03:03:02 2013] [notice] Accept mutex: fcntl (Default: fcntl)
    [Sun Oct 27 04:04:59 2013] [notice]  configured -- resuming normal operations
    [Sun Oct 27 04:04:59 2013] [notice] Accept mutex: fcntl (Default: fcntl)
    [Sun Oct 27 04:29:54 2013] [notice]  configured -- resuming normal operations
    [Sun Oct 27 04:29:54 2013] [notice] Accept mutex: fcntl (Default: fcntl)

  • Page Viewer Webpart not displaying some webpages

    Hello
    I have a SharePoint Server 2013 on-prem Publishing Site and the page viewer webpart is unable to display some webpages like Google homepage, etc. but is able to show webpages from a few other sites like internal SharePoint sites, skysports.com, etc.
    I am not able to see a pattern here. I first thought this might be caused due to some sites allowing authenticated access but now its not very consistent. Also, I tried the same with an Office 365 site and the results were exactly the same.
    Please help me to find out the reason for this issue.
    Thanks
    Parth

    Hi,
    According to your post, my understanding is that Page Viewer Webpart don’t display some webpages.
    There are many reasons for the block of the pages in the Page Viewer Web Part.
    For more information, you can refer to:
    IFrame is blocked in SharePoint 2013
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • If I have 2 tv's and each their own apple tv can I display the same program to them from my macbook at the same time?

    If I have 2 tv's and each their own apple tv can I display the same program to them from my macbook at the same time?
    for instance Keynote?

    Welcome to the Apple community.
    The Apple TV cannot display keynote presentations or websites from the computer. It can display them via mirroring from the iPad 2 or better or the iPhone 4S.
    You cannot AirPlay to 2 Apple TV 2's at the same time from an iOS device. You can watch the same video, TV show or listen to the same music from your iTunes library on multiple Apple TV's at the same time.

  • Sir / Madam        Actually I am willing to buy Apple (MD101HN/A) 13" MacBook Pro with Retina Display 2.6GHz. I am from siliguri, Dist Darjeeling, West Bengal, India. But currently i am unable to buy your product due to unavailability of your mentioned pr

    Sir / Madam
          Actually I am willing to buy Apple (MD101HN/A) 13" MacBook Pro with Retina Display 2.6GHz.
    I am from siliguri, Dist Darjeeling, West Bengal, India. But currently i am unable to buy your product due to unavailability of your mentioned product in India. so can you please inform me at least a confirmed date when will be the product available. because it's really a urgent for me. So please give a reply with a confirm date.
    Yours Faithfully
    Saikat Nath.

    This board is just other users, there's no one here from Apple to answer a question like that. Sorry.

  • How do I configure Firefox to autofit webpages (i.e. so I don't have to scroll to the right to see everything) and display all webpage content?

    I'm doing some maintenance on an old Dell Dimension 1100 (service tag: JGFN291, all drivers updated) for a friend, and I installed the new version of Firefox. Webpage graphics / backgrounds will not display, and the text on all webpages displays too large; I have to scroll to the left to see everything. How do I configure Firefox to automatically display all webpage content properly? It's probably due to the age of the PC and monitor (I think Noah took a pair of these on the ark with him back in the day), but I was hoping there was some other workaround for it. Any and all help is appreciated!

    there is no replay for the problem ?? mozillas's stuff doesnt work as good as their web browser...

  • Displaying unicode or HTML escaped characters from HTTPService in Flex components.

    Here is a solution on the Flex Cookbook I developed for
    displaying data in Flex components when the data comes back from
    HTTPService as unicode of HTML escaped data:
    Displaying
    unicode or HTML escaped characters from HTTPService in Flex
    components.

    Hi again Greg,
    I have just been adapting your idea for encountering
    occasional escaped characters within a body of "normal" text, eg
    something like
    hell&ocirc; sun&scaron;ine
    Now, the handy String.fromCharCode(charCode) call works a
    dream if instead of the above I have
    hell&#244; sun&#353;ine
    Do you know if there is an equivalent call that takes the
    named entities rather than the numeric ones? Clearly I can just do
    some text substitution to get the mapping, but this means rather
    more by-hand work than I had hoped. However, this is definitely a
    step in a useful direction for me.
    Thanks,
    Richard
    PS hoping that the web page won't simply outguess me and
    replace all the above! Basically, the first line uses named
    entities and the second the equivalent numbers...

  • Displaying selection screen as pop-up from dialog box

    Hi,
          I have a screen which is of dialog-box type. This dialog screen shows an ALV and has a button in the ALV toolbar. On pressing this button, a pop-up screen is to be displayed. This pop-up screen is designed as a selection-screen. Is it possible to display this selection screen as a pop-up from a dialog box screen?
    Regards,
    Suhas

    Hi Suhas,
    Its possible to display selection screen as pop-up from dialog box.....Check the code below...copy paste and execute...
    SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE text-001.
    PARAMETER p.
    SELECTION-SCREEN END   OF SCREEN 123.
    CALL SELECTION-SCREEN 123 STARTING AT 20 5
                                ENDING AT 80 15.
    The below code might help u to add a button in alvgrid's toolbar......
    *       CLASS lcl_event_handler DEFINITION
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        DATA: wa_toolbar   TYPE stb_button,
              calc         TYPE REF   TO cl_gui_frontend_services.
        METHODS : toolbar_handle FOR EVENT toolbar      OF cl_gui_alv_grid
                                        IMPORTING e_object
                                                  e_interactive,
                  ucomm_handle   FOR EVENT user_command OF cl_gui_alv_grid
                                        IMPORTING e_ucomm.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    *       CLASS lcl_event_handler IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD toolbar_handle.
        MOVE   3 TO  wa_toolbar-butn_type.
        APPEND wa_toolbar   TO e_object->mt_toolbar.
        MOVE : 0            TO wa_toolbar-butn_type,
               'CALC'       TO wa_toolbar-function,
               '@0M@'       TO wa_toolbar-icon,
               'Calculator' TO wa_toolbar-quickinfo.
        APPEND wa_toolbar TO e_object->mt_toolbar.
      ENDMETHOD. "toolbar_handle
      METHOD ucomm_handle.
        IF e_ucomm = 'CALC'.   " When button added in toolbar is clicked
          IF calc IS INITIAL.
            CREATE OBJECT calc.
          ENDIF.
          CALL METHOD cl_gui_frontend_services=>execute
       EXPORTING
         application            = 'CALC'.
        ENDIF.
      ENDMETHOD. "ucomm_handle
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    DATA : container    TYPE REF   TO cl_gui_custom_container,
           grid         TYPE REF   TO cl_gui_alv_grid,
           event        TYPE REF   TO lcl_event_handler,
           it_display   TYPE TABLE OF mara,
           wa_display   TYPE mara.
    START-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'BASIC'.
      PERFORM build_it_display.
      PERFORM create_objects.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          SET SCREEN 0.
          LEAVE SCREEN.
        WHEN 'EXIT'.
          SET SCREEN 0.
          LEAVE SCREEN.
        WHEN 'CANC'.
          SET SCREEN 0.
          LEAVE SCREEN.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  build_it_display
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_it_display .
      SELECT * FROM mara UP TO 15 ROWS INTO TABLE it_display.
    ENDFORM.                    " build_it_display
    *&      Form  create_objects
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_objects .
      IF container IS INITIAL.
        CREATE OBJECT container
        EXPORTING
          container_name     = 'CUSTOM'.
        CREATE OBJECT event.
        CREATE OBJECT grid
          EXPORTING
            i_parent         = container.
        SET HANDLER event->toolbar_handle FOR grid.
        SET HANDLER event->ucomm_handle   FOR grid.
        CALL METHOD grid->set_table_for_first_display
          EXPORTING
            i_structure_name = 'MARA'
          CHANGING
            it_outtab        = it_display.
      ENDIF.
    ENDFORM.                    " create_objects
    Cheers,
    Jose.

  • HT201493 When I add a person in io6 their email is only displayed not their name and picture from my contacts that the email is associated with, why?

    When I add a person in io6 their email is only displayed not their name and picture from my contacts that the email is associated with, why?

    The whole idea to an icloud account is that one user uses it and has all their devices synced together.  Different users need different Apple IDs to create their own icloud accounts.  Note that everyone can still use the same ID for an iTunes account (to share purchases).
    To create a new icloud account, go to
    http://www.apple.com/icloud/setup/

  • Internet Explorer cannot display the webpage error urgent!

    Hi,
    I have created a OAF page. am displaying some report data in the page. The VO query is executing more thatn 20 min to get the records after tuning.
    Now my problem is, am getting the error "Internet Explorer cannot display the webpage" in 10 mins after the VO query execution started. However, the DB session for this query is still executing at the backend and I am unable to get the same OAF page until the DB session completes.
    Could you please help me in this?
    Thanks,
    Raja.

    Raja,
    There are two options here :
    1) The correct one is to go via concurrent program , because as per web standards a web page should not take max of 3-4 minutes to render.
    2) If you still wanna go via your present approach, you need to set profile ICX:Session Timeout which specifies Maximum idle time for the Oracle Applications user session(specified in minutes).
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Error converting to cap file

    Hello everyone, I tried to follow sample of java card kit, but I've got this error when I 'd like to convert class file to cap file with converter. Assertion (precondition) [member != null] failed at: What's wrong ???? It's out only jca and exp file

  • HP LaserJet P-1006 printer stopped printing after Windows update

    One day this printer stopped printing.  Items were queued, wouldn't print.  Tried changing cables.  Uninstalled and reinstalled HP software.   Ran HP Printer and Scan Doctor.  Says it fixed Printer spooler error.  Won't print test page.  It's queued.

  • When to use Tables, which are defined as u0093No Objectu0094?

    Generally, in which situations should we use a “<b>no object type</b> ” table ? There’s not much explanation about that type in help files.

  • Url char-encoding problem

    I am connecting to a web-server. The URL has Japanese characters embedded in it. When run from NetBeans 6.8 everything works ok. When run from the shell, the server appears to not understand the Japanese characters. For example, if the Japanese chara

  • Album/track consolidation

    Help. I have an HP Pavilion with VISTA recently installed. I just want to consolidate all my tracks that belong to one album on just one album. I have tracks scattered about with the matching album artwork. I might have an album with one track listed