Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Pop up that takes data from user

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Pop up that takes data from user

    Hi everyone,

    I am new to java and have an assignment to complete which goes as follows:
    I have no clue on how to proceed.

    I need to bring out a pop-up on a browser when the webpage is closed (after browsing for >30sec.)
    This pop us shall take data (yes/no) from the user and depending on the data entered same pop -up should show another question.


    I got code for generating pop-up on closing a browser, but implementing the 30 sec time constraint is beyond me currently.
    Also I am clue-less on retrieving data from the pop-up

    Please help me out.
    Thanks a ton in advance.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Pop up that takes data from user

    Is this a java question, or a javascript question? The two are completely different, and this is a java forum.

  3. #3
    Junior Member
    Join Date
    Aug 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Pop up that takes data from user

    Well I am completely new to coding, we were told that the above assignment was to be done in java.

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Pop up that takes data from user

    Then I don't truly understand what the goal is based upon the above description. That being said:

    but implementing the 30 sec time constraint is beyond me currently.
    See the Thread class.

    Also I am clue-less on retrieving data from the pop-up
    See How to Make Dialogs (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)

  5. #5
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Pop up that takes data from user

    This would be more than a "beginner" task in java. Are you sure it is not to be done in javascript? Please do double check before proceeding.

Similar Threads

  1. Need help storing user data in hashtable
    By leonne in forum What's Wrong With My Code?
    Replies: 10
    Last Post: November 5th, 2012, 07:04 PM
  2. Multiple User's Data
    By RLS0812 in forum Object Oriented Programming
    Replies: 1
    Last Post: February 19th, 2012, 05:19 PM
  3. How to create jtree which takes data from database in swing??
    By neerajshah84 in forum AWT / Java Swing
    Replies: 1
    Last Post: August 4th, 2011, 08:57 AM
  4. Java Bar graph takes user input to create graph?
    By kenjiro310 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 31st, 2011, 07:37 AM
  5. Storing User Data
    By aussiemcgr in forum Java Theory & Questions
    Replies: 1
    Last Post: January 21st, 2011, 09:07 AM

Tags for this Thread