Results 1 to 8 of 8
- 10-10-2009, 12:38 AM #1
Reset form button and duplicated data
I am hoping that someone can help
I have a gui, has a reset button on it, at the moment it contains duplicate data as when the app first runs.
Is there a way to set it so that the reset button triggers the program to go straight to the top of the file so that the data is only in the program once rather than in the array and in the reset button?
Thanks in advance
- 10-10-2009, 03:29 AM #2
I currently have this working with duplicate data in 2 areas, I realise that this is not good practice but at the moment is the only way I know although I do realise there has to be a way to resolve this.
Thanks in advance for suggestions
-
- 10-10-2009, 03:56 AM #4
No what i mean is i have a list of 40 strings in total in an array, I aalso have a reset button on the gui, in this gui I have duplicated those strings so there is duplicate data.
What I am trying to do is get the reset button to read the original data rather than adding 40 lines to the program.
Is there a way round it
Thanks in advance
-
Sorry, but I really have no idea of what you're talking about. You must post your question as if we don't know your program inside and out as you do. We can't read your mind.
-
I would assume that you're trying to change the information displayed in your GUI to a previous state -- and there are many many ways to do this, the best will likely depend on the set up of your current program and the details on what you are trying to achieve. Are you trying to restart some initial conditions? Perhaps you want to use a a data file or a program Properties that are re-read on reset. Are you trying to "un-do" an action? Then perhaps you want to save state in a Stack. But I have no idea what would work best for you given the information thus posted.
- 10-10-2009, 04:25 AM #7
ok, here is the gui in netbeans

The data that is displayed in the textfields is in 2 places, i have it under
and then exaclty the same data as displayed underJava Code:public class BubbleSort extends javax.swing.JFrame {
What I want to know is if after the user has done a sort or search if they press reset is there a way that I can get it to display the data you see without having duplicate data entered into the application?Java Code:private void cmdResetActionPerformed(java.awt.event.ActionEvent evt) {
Thanks in advance
-
Sure, use two arrays that are initially the same, and only sort one. Keep the other to store the initial data.
Similar Threads
-
want to generate a html form page with dynamic data and submit this form to a url
By vishalkrsrivastava in forum Java AppletsReplies: 10Last Post: 08-12-2009, 04:02 PM -
enctype=multipart/form-data with form data in struts
By vk_satheesh in forum New To JavaReplies: 0Last Post: 09-19-2008, 12:48 PM -
<html:reset> button in struts
By Satheeshhere in forum Web FrameworksReplies: 1Last Post: 07-15-2008, 03:14 PM -
simulate form type=button press with java application
By redmoonzer01 in forum NetworkingReplies: 1Last Post: 03-29-2008, 06:28 AM -
Adding EXIT button on MIDlet form
By Java Tip in forum Java TipReplies: 0Last Post: 11-22-2007, 10:13 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks