Displayed a message box then removed it by a program without user action

Can a message box be displayed by a program and then removed by the program without any user action such as clicking OK or closing the box?
If so, will you show us how to do that?
I have a non-GUI application which needs to tell the user to wait while classes and being created and data is being loaded from the network. The message needs to disappear when the program is ready.
Thanks!

Here is an example of using the JDialog you will have to make it look like you want I just pieced this together real quick
import javax.swing.*;
public class test extends Object
    public test()
        longOperation();
        System.exit(0);
    public void longOperation()
        JDialog dialog = new JDialog();          
        dialog.getContentPane().add(new JLabel("Wait"),java.awt.BorderLayout.CENTER);
        dialog.setSize(200,200);
        dialog.setVisible(true);
        // used to simulate a long operation
        Thread t = Thread.currentThread();
        try
            t.sleep(2000);
        }catch(Exception e){}
        dialog.dispose();
    public static void main(String args[])
        new test();  
}

Similar Messages

  • How can i display a message box when error comes in jsp?

    Hi,
    i need to display a message box whenever an error comes in my jsp. Actually my appln is that i am creating a bar chart using one applet by taking data from the database. When a user does not select a number data for y axis, now in the centre of the web page one java error is coming. "not in number format". it is looking very odd.
    so i want to display the error in a message box whenever it comes as above. pls help me how can i do the same...
    Regds,
    Abhi...

    Hi,
    thanx for ur response. so u mean to say that i can
    display the errors in the web page itself instead of
    displaying as a message box?Either way. You can have the JSP send a message to the applet to display a message box. Or you can just have the JSP do it. or you can have the applet detremine if the JSP would produce an error and then display the message it would display.
    >
    actually i am using servlets. jsp pages are used only
    as the front end. all the background works are doing
    in servlet only.It should be the same in any case. Is the applet connecting to the JSP pages or are you having the browser do it?
    >
    pls get back...

  • My iphone 4 started displaying a message box with the following message: "This accessory is not optimized for this phone. You may experience noise and loss of battery."  My question is: how to fix this?

    My iphone 4 started displaying a message box with the following message: "This accessory is not optimized for this phone. You may experience noise and loss of battery."  My question is: Why is this happening and how do I fix it? (I'm losing battery power precipitously). Thanks in advance for any assistance with this question.

    Thanks Kilted Tim, you solved the problem. I'm mightily impressed at the simplicity of the solution!
    Jaded Kane

  • How to display a message box in a UIX JSP page?

    I've a UIX JSP Application with BC4J developed with JDeveloper RC.
    The problem is that when the user mistakes in the insertion/updating, I'd like to help him displaying a message box or a modal dialog window.
    In particular, I've the following code:
    <%@ page errorPage="errorpage.jsp" contentType="text/html;charset=WINDOWS-1252"%>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
    <%@ taglib uri="http://xmlns.oracle.com/uix/ui/bc4j" prefix="bc4juix" %>
    <%@ page import="oracle.jbo.JboException" %>
    <%@ page import="CdssPackage.*" %>
    <%-- Define Application Module and DataSource--%>
    <%-- Define Application Module and DataSource--%>
    <jbo:ApplicationModule configname="CdssPackage.CdssPackageModule.CdssPackageModuleLocal" id="app1" username="scott" password="tiger" releasemode="Stateful" />
    <%
    //Check the mandatory fields are not null
    if ((cod_comm.compareTo("")==0) || (nome_ruolo.compareTo("")==0)){
    throw new JboException(Errors.ERR_REQUIRED_FIELD);
    //Now, the errorpage.jsp is displayed, while I'd like to display a message box or a modal dialog window
    %>
    How can I do it?
    Thanks in advance.

    Michele-
    You can use javascript to send a message window in the http protocol.
    Hope this helps,
    Lynn
    Java Tools Team

  • Firefox 4 displays multiple message boxes with "uninstall set'. How do I stop this?

    Firefox 4 displays multiple message boxes with "uninstall set'. They cannot be closed and they freeze Firefox. The only way to stop is to END TASK through the Task Manager.
    OS: Vista) with all service packs and updates as of 21 Apr 2011. All other browsers and applications are closed.

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    In Firefox 4 you can use one of these to start in <u>[[Safe mode]]</u>:
    * Help > Restart with Add-ons Disabled
    * Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)
    See:
    * [[Troubleshooting extensions and themes]]

  • How to display a Message box

    Hi,
    i am using oracle forms 10g
    i need to dispaly a message box like VB.NET to user that displays messgae
    say "hello"
    how do i do it....whats the syntax or built in used ??
    plz help

    Rosario,
    If you use the message built-in, isn't the message
    displayed on the status line and you get a blank
    popup? Correct me if I am wrong.Sayeed ,
    If you write one and only one message, you are right it is displayed on the status line , but I wrote
    Message
    Message
    The second message only needs to be:
    Message(' ',no_acknowledge);
    The second message forces the first to pop up like an alert.
    Regards

  • How to display warning message box with yes and no buttons

    Hi,
    I am writing the code to delete emp details from database.
    I want to display warning message with yes and no buttons after clicking the delete button in the same page, if yes is clicked, i want to invoke delete() method in AM.
    Is it possible, if yes pls suggest me how to do it.
    Thanks
    Message was edited by:
    user536125

    This is being discussed in
    warning message(dialog page) to be displayed in the same page
    Thanks
    Tapash

  • How to display alert message box in sharepoint 2013 visual web part?

    Hi,
    I am developing a visual web part which submits data to the list. Once it submits the data, I should convey to the user that the data has been submitted successfully.
    I tried using clientScript.RegisterStartUpScript etc, but, none of them are working. It is not throwing any error , but pop up is not getting displayed.
    Preferrably, I would like to call this alert message from cs page, because, I will be using it in several places.
    Please help me.!
    Thanks in advance.
    Hepsi

    Hepsi, 
    Step 1. On the Page_Load - This way you can pass parameters. Try this
    btn.Attributes.Add(
    "onclick", string.Format("return openSPPopup('{0}?{1}={2}', '{3}')", YourPage_URL, var1_Name, value1, Param1_PopupTitle));
    Step 2 : Javascript function
    function openSPPopup(navigateURL, popUptitle) {
    var options = {
    width: popupWidth,
    height: popupHeight,
    url: navigateURL,
    scroll: 0
    SP.UI.ModalDialog.showModalDialog(options);
    return false;
    Step 3: The popup close code (in .cs file) – I do it this way as it is just close dialog code and easy to write.
    protected void btnClose_Click(object sender, EventArgs e)
    { this.Page.ClientScript.RegisterStartupScript(this.GetType(), "PopupScript", "SP.UI.ModalDialog.commonModalDialogClose(1, 1);", true);
    Courtesy -
    Thread
    Try this - https://bramdejager.wordpress.com/2011/03/21/using-sp-ui-dialog-and-sp-ui-notify-from-code-behind/
    http://msdn.microsoft.com/en-us/library/ff798390.aspx
    http://stackoverflow.com/questions/9833907/asp-net-confirm-before-executing-codebehind
    http://www.codeproject.com/Questions/443131/Call-to-javascript-Function-from-code-behind-using
    http://www.c-sharpcorner.com/uploadfile/ledomoon/calling-code-behind-function-in-javascript/
    Hope they will help!
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • How to call a .ini file from a TestStand sequence (ex: display a message box using a .ini file text) ?

    Thank you for your help.
    Message Edité par Ralphi le 09-26-2005 03:26 AM

    You will need to use the GetResourceString method. A good place to start is here: http://zone.ni.com/devzone%5Cconceptd.nsf/webmain/E835479AA4E7CB2486256BEB006B4925
    Hope this helps
    kph

  • Quiet removing Antivirus SCCM Endpoint Protection without user intervention

    Antivirus SCCM
    2012 Endpoint Protection is deployed on Workstations.Can
    I uninstall Endpoint Protection on the
    computers on the network automatically via SCCM or command-line tools
    invisible from the user?

    You need to create a package to uninstall the
    SCCM 2012 Endpoint Protection.
    Uninstall string: C:\Windows\ccmsetup\scepinstall.exe
    /u /s
    Make sure you disable End point protection policy and select False or No in
    Manage Endpoint Protection client on client computers, otherwise the client will be reinstall. 
    http://technet.microsoft.com/en-us/library/4acd0c29-e453-4863-8194-e479263291c8#BKMK_EndpointProtectionDeviceSettings
    Please take a moment to Vote as Helpful and/or Mark as Answer where applicable.
    Thanks.

  • How to display a message dialog box

    I need to know how to display a message box from my application.
    Anyone can help me?
    Thanks in advance

    Dear Zennen,
    Use JOptionPane.
    Ex
    JOptionPane.showMessageDialog(this,"message","title",JOptionPane.INFORMATION_MESSAGE); Thanks
    Joey

  • Please help me with Powershell Script - Message Box to display after Installation

    Hi Guys,
    Am using package model to deploy the software. After installation on client machines i want to display a dialog box to notify the successful installation.
    Currently trying VBScript to show the dialog message.
    But few machines i get this dialog and few machines am not getting, in program command line am calling a batch script.
    Now am planning to use a Power shell scripting to show a message box and trying to call it through a batch script.
    Please assist me with the powershell script which will display a message box like above
    (and let me know in script how to enable the set-execution policy Remote signed enabled)
    Thanks,

    You can set the execution settings from within the client settings.
    For a simple message box without having to load assmemblies
    $wshell = New-Object -ComObject Wscript.Shell
    $wshell.Popup("Operation Completed",0,"Done",0x1)

  • Need help displaying message box.

    hi, i have an application which takes pretty long to run. The process basically consists of several sql statements. My idea was to display a message box just before the process starts saying something like "in progress... please wait". Anyway i created a message box using jdialog but the problem now is, it just displays and empty box, the message is displayed only when the process has finished running which is useless. if i use the msg box elsewhere, it runs just fine, only when it is placed before a block of long running code (e.g a very big loop) it just does not display the text.
    Can anyone please advise me on this issue, thanks!

    hi, i have an application which takes pretty long to
    run. The process basically consists of several sql
    statements. My idea was to display a message box just
    before the process starts saying something like "in
    progress... please wait". Anyway i created a message
    box using jdialog but the problem now is, it just
    displays and empty box, the message is displayed only
    when the process has finished running which is
    useless. if i use the msg box elsewhere, it runs just
    fine, only when it is placed before a block of long
    running code (e.g a very big loop) it just does not
    display the text.
    Can anyone please advise me on this issue, thanks!If you don't want to get into threads and things like that, try the following?
    1. Add some delay between the message box request and start of the query.
    Like
    for (int i = 0; i < 100000; i++) {} // you have to experiment with the limit. A second's worth should be enough to see if this makes any difference.
    2 Add the method repaint(); after the message request.
    3 Add the method repaint(); and delay after the message request but before the query request.
    LIke
    // message display request
    repaint();
    for (int i = 0; i < 100000; i++) {}
    // query
    What's interesting to me is that an empty box is drawn. So my guess is if enough time (a second say) is given, the message box will be drawn completely. (Of course, I'm not sure.)

  • Display a floating message box ligh the item Help

    Hi,
    I would like to display a message box with some longer messages for the end user. Is there any Javascript / JQuery API call where I could give the message as input and use the same look-and-feel as the item help? TIA.
    Tamas

    Hi,
    This might help
    http://dbswh.webhop.net/dbswh/f?p=BLOG:READ:0::::ARTICLE:2137800346082883
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Execute query and Message Box Problem!

    Hi,
    I have a procedure to built undo function :
    declare
    ls_row varchar2(55);
    ls_item varchar2(55);
    begin
    go_block(:parameter.l_current_block);
    ls_row := :m_form.rowid;
    execute_query;
    if ls_row is null then return; end if;
    loop
    exit when :m_form.rowid = ls_row;
    exit when :system.last_record = 'TRUE';
    next_record;
    end loop;
    end;
    This procedure working fine.
    When I have edit some data and want to undo, then I pressed undo button. It's always display the message box "Do you want to save change you have made?".
    I don't know how to make this message box can't display and being the execute_query work directed.
    It's urgent, please help!
    Thanks,
    Leny

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by lenyhu:
    Hi,
    I have a problem again........
    If the item have a when-validate-item trigger. When I run undo function, how can I do to skip this validation and just do the undo function?
    Leny <HR></BLOCKQUOTE>
    set_item_property ( item_id, item_is_valid, property_true );
    undo_function
    set_item_property ( item_id, item_is_valid, property_false );
    hope this helps.

Maybe you are looking for

  • Can we Install siebel crm latest version on Windows  7 (64 bit )

    Hai to all May i know the Latest Version of Siebel CRM ? Can we install Siebel Crm on windows 7 (64) bit operating system. And i downloaded some of the files from oracle e-delivery cloud. its and all jar files how can i convert into .Exe Files ? Can

  • Crucial Ram

    Hello all, I am in need of a ram upgrade. I followed some links to a website called crucial.com. Is this place good to buy Ram from, anybody know? I downloaded their scanning application and it came up with the recommended ram for my machine. I was a

  • KDE - Close window on task manager thumbnail middle click

    So as the title says, I'd like to know if this possible. I can't seem to find the option anywhere and I don't mind dirty hacks like recompiling icon-only task manager or so. This really annoys me thx b4 Last edited by reed1 (2013-08-22 04:35:29)

  • Transport released it taking more time

    Hi Every One, As i want to transport the program with teir package , smartforms etc. I  created one transport request with transport of copies and include all package in that and released Its taking more time Status in the se01 showing request is rel

  • STO Scenarion with - Ve cost as custom duty

    Hi, I have created a condition type let say X1, I am doing a STO scenario, from Plant A100 to Plant A101 in company Code A001 Now requirement is use condition type X1  for values as - ve as well as +ve depending on situation. I am able to do so, by c