LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-03-2011, 06:23 AM   #1
lalitcoep
LQ Newbie
 
Registered: Sep 2010
Location: INDIA
Posts: 15

Rep: Reputation: 0
Unhappy Restart the Program execution : Java


In gui validation if user enters string in integer requiring field, a dialog box pops out. So on clicking the button i want to stop the program execution and return to the previous jframe(either the same one or newly created object of it).

How can i handle this in java.
I tried calling main(); but it doesn't work.
Also System.exit(0); doensn't work.

Thanx in advance!!
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 05-04-2011, 01:23 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
If you want to validate input using a GUI, then you need to:

a) decide at which point validation should occur (for example, when the user pushes the "accept" button)
b) write an event handler for whichever GUI object gets the event (for example, the "accept" Jbutton)

Here's a good link about event handling in Java Swing:

http://download.oracle.com/javase/tu...nts/index.html
 
2 members found this post helpful.
  


Reply

Tags
execution, java


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Restart PADS from Java Program khirodpatra Linux - Newbie 1 07-15-2010 01:08 AM
create bin file for execution of java program jigargajjar Linux - Software 1 12-03-2009 03:39 AM
java program compilation n execution :me a newbie narendra.pant Programming 2 04-15-2006 01:23 PM
Pausing the execution of a java program with linux balteo Linux - Software 2 09-04-2005 10:47 AM
Key bindings program (custom pasting, program execution, etc.) jrdioko Linux - Software 2 02-05-2005 09:09 PM


All times are GMT -5. The time now is 07:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration