Results 1 to 2 of 2

Thread: Java application

  1. #1
    LewisClark is offline Senior Member
    Join Date
    Dec 2009
    Posts
    260
    Rep Power
    3

    Default Java application

    I am last year computer science Student. I am learning java programming language. In our last lecture our sir asked one question like How to terminate a Java application? Not any of us able to give answer of it. Can anybody tell me how to terminate a Java application? Please help me.
    Thank you.
    Last edited by LewisClark; 02-06-2010 at 03:59 PM.

  2. #2
    WalkerCook is offline Senior Member
    Join Date
    Dec 2009
    Posts
    253
    Rep Power
    3

    Default

    It is very easy program. In the following program I have form one class called as Sample File. In this class I have build one variable called as "static BufferedReader BR1". After this I use BR1 in getContent() method.

    public void windowClosing(WindowEvent es)
    {
    try
    {
    int options = JOptionPanse.showConfirmDialogs(null, "are you sure want to close the application?",
    "Select correct Options", JOptionPane.YES_NO_OPTION);

    SampleFile.BR1.close();

    if(options == 0)
    System.out.println("Hi");
    }
    catch(IOException ies)
    {
    JOptionPane.showMessageDialog(null,"one error shows here ");
    }
    }
    Last edited by nitesh14; 02-06-2010 at 03:03 PM.

Similar Threads

  1. A java web application.
    By BellWard in forum Programming
    Replies: 1
    Last Post: 01-28-2010, 04:28 PM
  2. Net Application in PHP
    By andreata in forum Applications
    Replies: 0
    Last Post: 01-24-2009, 08:20 AM
  3. Java Web application development
    By brendin44 in forum Web. 2.0
    Replies: 1
    Last Post: 12-19-2008, 10:46 AM
  4. Java Web application development
    By anna26 in forum Everything Else
    Replies: 0
    Last Post: 12-19-2008, 10:41 AM
  5. Can't Run an Application
    By Macavi6987 in forum Windows XP
    Replies: 1
    Last Post: 11-26-2008, 01:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48