How to start a application with a login window?

hi there
does anyone have any idea on how to start an application with a login window? a login window is the first frame or window to be displayed when an application starts running. and only correct login id and password have been entered the real application will start. any sample out there? thank you.

You can start a new thread by making a thread object and passing it an implementation of a runnable object. Runnable has just one method, public void run(), this is was gets executed in a second thread. perhaps the code you would use would look something like this.
<code>
// set up thread for login window
new Thread(new Runnable() {
public void run() {
// construct your login window here
// when you are done processing the
// password....
if(goodPassword) {
authorized = true; // a global variable
notifyAll(); // don't forget this
else {
System.exit(42);
}).start();
// control does not stop this code gets executed while
// the above thread is running.
// Set up main program here. This is done in the
// backround.
while(!authorized) {
synchronized(this)
{ wait(50); }
// now when the user logs in this frame pops
// up real quick.
myFrame.setVisible(true);
</code>
Hope you can figure it out.. good luck :)

Similar Messages

  • Applescript: How to start an application with parameters

    AppleScripters,
    I am sorry if I have posted this in the inappropriate forum, I saw none with a specific regard to AppleScript.
    Let us presume that we have a regular shell script which when initiated from the Terminal has code such as what follows hereupon:
    /Applications/SeaMonkey.app/Contents/MacOS/seamonkey -editor /Users/joebuffoon/myhomepage.htm
    In order to convert this to AppleScript I was told to use:
    activate application "Seamonkey"
    This works, but seems not to support the ability to either provision the "-editor" argument (such argument would impel Seamonkey to start in "composer mode"), nor does it seem to provision the allowance of supplying a file to open in "composer mode" as the aforementioned command line in my shell script would.
    Can I ask if anyone has any idea how I can do this in AppleScript?
    I am also interested to find a good book on Apple Scripting (preferably one available in PDF format as well, if possible).
    Thanks in advance,
    Stuart

    I saw none with a specific regard to AppleScript
    http://discussions.apple.com/forum.jspa?forumID=724

  • How to start an application with parameters

    AppleScripters,
    Let us presume that we have a regular shell script which when initiated from the Terminal has code such as what follows hereupon:
    /Applications/SeaMonkey.app/Contents/MacOS/seamonkey -editor /Users/joebuffoon/myhomepage.htm
    In order to convert this to AppleScript I was told by an associate to use:
    activate application "Seamonkey"
    This works, but seems not to support the ability to either provision the "-editor" argument (such argument would impel Seamonkey to start in "composer mode"), nor does it seem to provision the allowance of supplying a file to open in "composer mode" as the aforementioned command line in my shell script would.
    Thus, my query is if anyone has any idea how I can do this in AppleScript?
    I am also interested to find a good book on Apple Scripting (preferably one available in PDF format as well, if possible).
    Thanks in advance,
    Stuart

    I've had success with the script below, tested using SeaMonkey version 2.0b1 and Mac OS 10.4.11. It may or may not work with earlier versions of SeaMonkey, however, as the new beta version features UI changes.
    No browser window will open as long as SeaMonkey > Preferences > Appearance is set to open Composer exclusively at startup.
    Be advised that the script is meant to run slowly and might appear to be hanging when such is not the case. Adjusting delay times would be key if the script does fail at any point, however. Good luck.
    +Copy the block of code below and paste it into your AppleScript Script Editor:+
    *tell application "SeaMonkey" to activate*
    *delay 4 -- four-second delay; increase if necessary*
    *tell application "System Events"*
    *tell process "SeaMonkey"*
    *if not (exists window "untitled - Composer") then*
    *key code 21 using command down -- makes new window if necessary ("Command + 4")*
    *end if*
    *delay 2 -- increase if necessary*
    *keystroke "o" using command down -- "Open File…"*
    *delay 2 -- increase if necessary*
    *keystroke tab using shift down*
    *keystroke tab using shift down -- brings focus to text field for file search*
    *keystroke "File Name" -- enters file name (you must replace text within quotes with actual file name)*
    *key code 47 -- enters "dot"*
    *keystroke "html" -- enters extension*
    *delay 10 -- ten-second delay could be MININUM; increase if necessary*
    *keystroke tab*
    *keystroke tab -- brings focus to scroll area*
    *key code 125 -- presses down arrow to highlight specified file*
    *keystroke return -- presses "Open"*
    *end tell*
    *end tell*

  • How to start jdev 1013 with jdk64bit on windows XP64

    my acer ferrari is 64 bit cpu but when i need to run jdeveloper1013 by jdk64bit
    it's alert .dll not found. help me.

    No body help ?

  • How to download the application with my apple ID

    how to download the application with my apple ID

    What have you tried or are you asking how to do it from scratch?
    https://itunes.apple.com/us/app/apple-store/id375380948?mt=8

  • How to start java applet with netbeans 6.1

    hey,
    I want to learn how to start java applet (with database) with netbeans.. I'm new to java...can you show me how can i start..if you have any doc about it can you send it to me..thank you..:)

    You really should be asking this NetBeans question at the NB site - these forums are for Java language topics, not NB support.
    [http://www.netbeans.org/kb/61/web/applets.html]
    Almost any NB question you have can be answered by either the NB web documentation or the NB program's Help.

  • How to deploy cairngorm application with FTP support?

    Hi,
    I have a cairngorm application, it works fine in my local
    computer.
    But I need to upload it to a website in my web hosting
    company with FTP,
    but it doesn't work in the hosting server because I can not
    add the cairngorm.swc file to the application.
    Please give me a idea how to deploy the application with ftp
    software.
    Thanks a lot
    Mark

    Any opinions are welcome

  • Anyone know how to gernerate CRUD applications with flex and coldfusion?

    Anyone know how to gernerate CRUD applications with flex and
    coldfusion? I am working with a remote coldsfusion installation
    with MS SQL and I don't have RDS.

    You might investigate "squidhead". It is CF based. I'm not
    sure if it has any Flex related features.
    http://squidhead.riaforge.org/

  • How to integrate android application with oracle database using oracle mobile database server.

    Hi,
    I developed one web application using oracle database. I want to implement same web application in android. My problem is how to integrate android application with existing oracle database using oracle database mobile server. Can u please guide me how to install oracle database mobile server and how to integrate android app with existing oracle database..
    Thank you.

    In the Database Mobile Doc set there is an entire book that covers the Installation of Oracle Database Mobile Server.   Chap 4 of that book contains screen shots and all kinds of information that will help guide you through the installation.   We also have a doc on the different mobile clients.  Chap 2 of that guide covers installs and integration of an android app. 
    thanks
    mike

  • How to start Integration server with the user XISUPER

    Hi,
    How to start Integration server with the user XISUPER?
    Regards,

    Mahesh,
    In the post installation document, under Creating User XISUPER,
    I see the following,
    1.You must now log on to the Integration server host with the user XISUPER, to switch the initial password to a valid password.
    2.You must restart the J2EE engine to transfer the user creation to the J2EE immediately.
    I am unable to proceed here.Can you please help me to resume the post installation steps ?
    Thanks,

  • Is there a way to start a Sequence with Task Manager (Windows)

    Hi
    Is there a way to start a Sequence with Task Manager (Windows)?

    Hi,
    That is too bad I can not schedule my action Wizard to run via Windows scheduler... The funney things about is that on the same machine that I have created the Action Wizard and saved to to my desktop via export, when I click on it to run it asks me you want to Import that action to your Acrobat Pro X? Okay or Cancel... That Action is already there in my action Wizard List and I have exported from this same machine and I was trying to see if I can schedule it via this command:
    C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat <C:\Users\Bahram\Desktop\OCRFaxedPDFs.sequ
    Regards,
    Jeff P.

  • How can I start any application with buttons

    Hello, I want to start any kind of applications with Buttons. I want to make me a GUI with buttons and with one button I want to start Outlook, but I dont know how this will work!
    THX for your help

    Runtime class exec methods
    If your Outlook executable is in different path ... import java.io.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test2 extends JFrame implements ActionListener
       public Test2()
          super("Test");
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          setSize(300, 200);
          JButton b = new JButton("Outlook Express");
          b.addActionListener(this);
          getContentPane().setLayout(new FlowLayout());
          getContentPane().add(b);
       public void actionPerformed(ActionEvent e)
          try{
             Runtime runTime = Runtime.getRuntime();
             Process proc = runTime.exec
                         ("C:\\Program Files\\Outlook Express\\msimn.exe");
             proc.waitFor();
          }catch(IOException ioe){System.out.println("Wham");}
          catch(InterruptedException ie){System.out.println("Bop");}
       public static void main(String[] args)
          new Test2().setVisible(true);
    }

  • APEX 3.2 Associating application with SSO login page.

    Hi
    My requirement is to replace my login page of APEX3.2 application with an SSO login page. Also, the application uses some tables with some history columns like: "Last Updated by", "Created by", "Last Update Time", etc... While create/edit of any table, I want these columns to be automatically populated according to the credentials used in SSO login page to that application. Please help.
    The link given on this forum (http://www.oracle.com/technology/products/database/application_express/howtos/sso_partner_app.html) for the purpose seems to be obsolete i.e. for previous versions of APEX.
    Thanks
    Bhavesh

    Bhavesh,
    That how-to explains all the steps you need to set up SSO with Application Express.
    As far as the audit columns, just create triggers on your tables. Referenced v('APP_USER') to get the authenticated username.
    Scott

  • How to start Oracle Application Server 10g on Linux

    Hi,
    I have installed the Oracle Appliacion server and Infrastructure server on Linux. Both I have installed under with Diff. folder
    Can some one please tell me how to start / stop Appliacion server and Infrastructure server on Linux
    We are going to use the these with Oracle EBS 11.5.10.2 .
    Oracle EBS 11.5.10.2 installed in the same Linux server under diff. folder
    Can some one please guide me.
    Thanks,

    You can do as rizla said or go another route.
    We setup profiles to use for all of the oracle homes. Then in the scripts we call the profiles. Easier to migrate and manage in my opinion if you have multiple oracle homes. You can then use profiles when ssh'd into the boxes, too. Both ways will work.
    Example:
    Script which you can chkconfig.
    #!/bin/sh
    # oracle_collabInfra
    # This shell script takes care of starting and stopping Oracle Collab Infra instance.
    #chkconfig: 345 96 14
    # Source function library.
    . /etc/rc.d/init.d/functions
    RETVAL=0
    start () {
    echo $"Starting Collab Suite on the Infra instance..."
    echo $"Starting Listener..."
    runuser - oracle -c ". /home/oracle/.collabInfra_profile; lsnrctl start"
    sleep 10
    echo $"Starting Metadata Repository..."
    runuser - oracle -c ". /home/oracle/.collabInfra_profile; sqlplus '/ as sysdba' <<!
    startup;
    exit;
    sleep 10
    echo $"Starting Enterprise Manager Application Server Control..."
    runuser - oracle -c ". /home/oracle/.collabInfra_profile; emctl start iasconsole"
    sleep 5
    echo $"Starting Infra OID and OC4J_Security processes..."
    runuser - oracle -c ". /home/oracle/.collabInfra_profile; opmnctl startproc process-type=OID"
    runuser - oracle -c ". /home/oracle/.collabInfra_profile; opmnctl startproc process-type=OC4J_Security"
    echo $"Starting Infra HTTP_Server processes..."
    runuser - oracle -c ". /home/oracle/.collabInfra_profile; opmnctl startproc process-type=HTTP_Server"
    return $RETVAL
    stop () {
    echo $"Stopping Collab Suite on the Infra instance..."
    echo $"Stopping all Infra OPMN managed processes..."
    runuser - oracle -c ". /home/oracle/.collabInfra_profile; opmnctl stopall"
    sleep 5
    echo $"Stopping Enterprise Manager Application Server Control..."
    runuser - oracle -c ". /home/oracle/.collabInfra_profile; emctl stop iasconsole"
    sleep 10
    echo $"Stopping Metadata Repository..."
    runuser - oracle -c ". /home/oracle/.collabInfra_profile; sqlplus '/ as sysdba' <<!
    shutdown immediate;
    exit;
    sleep 10
    echo $"Stopping Listener..."
    runuser - oracle -c ". /home/oracle/.collabInfra_profile; lsnrctl stop"
    return $RETVAL
    restart () {
    stop
    start
    RETVAL=$?
    return $RETVAL
    # See how we were called.
    case "$1" in
    start)
    start
    stop)
    stop
    restart)
    restart
    echo $"Usage: $0 {start|stop|restart}"
    RETVAL=1
    esac
    exit $RETVAL
    profile:
    export ORACLE_BASE=/opt/oracle
    export ORACLE_HOME=$ORACLE_BASE/collabInfra
    export ORACLE_SID=orcl
    export TMP=/tmp
    export TMPDIR=/tmp
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib
    export PATH=/bin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/kerberos/bin:/usr/local/bin:/usr/X11R6/bin:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/opmn/bin:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/backup_restore
    unset USERNAME

  • How to Deploy J2ME applications with data in RMS?

    Hello everyone,
    I am designing a J2ME application, a simple "Who wants to be a millionaire game". It stores questions and answers from a rms datastore. I want to to how can I deploy this application with questions and answers in the recordstore. Each time I run the emulator, the data stored previously gets deleted. Is it possible to attach the rms recordstore along with the .jar or .jad files? If so how can I do it. Please help.
    Thank you all in advance.

    Thank you Sypress.. When I install it the code works fine. But I wanted to include data with the application. I think I found a way way. I added the data in a text file and while starting the application I inserted data from the file into the recordstore.

Maybe you are looking for