This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Project Problems - Help ASP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Project Problems - Help ASP" Watch "Project Problems - Help ASP" New topic
Author

Project Problems - Help ASP

mo robertson
Greenhorn

Joined: Mar 29, 2004
Posts: 24
ok, let me explain first, what im trying to achive.
i currently have a GUI window called 'Ossian' and one class called 'Holiday'
basically i've got 7 textboxes, and an add button. Once u fill in all 7 textboxes with the info of the holiday you wish to add, you click the 'add' button, it adds that holiday to an array. the class holds all the varible values from the textboxes it has recived so they can be used around my program. however i have ran into a few problems doing this. maybe someone could point me in the correct direction. thanks alot
toothpick
here is my code i did myself, it runs but doesnt do as i require, im doing something wrong.
ALL IN BOLD I PUT IN MANUALLY, SO THATS THE CODE TO CHECK, SUNONESTUDIO DID THE REST KINDOF


[ April 29, 2004: Message edited by: mo robertson ]
[ April 29, 2004: Message edited by: mo robertson ]
[ April 29, 2004: Message edited by: mo robertson ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

You might consider letting us know what it is that you expect the code to do, and what it does instead.


[Jess in Action][AskingGoodQuestions]
mo robertson
Greenhorn

Joined: Mar 29, 2004
Posts: 24
this is a travel holiday package, which allows the user to input holidays, which are stored in an array then later saved to file. (the saved to file will be worryed about later) just now all im after is allowing the holidays to be stored in the array.

ok lets break this down a little, lets start by first adding a holiday to an array. im using textboxes for the input and a command button to perform the add action.
Add A Holiday To Array
Destination [_____________________]
Airport [_____________________]
Accomodation [_____________________]
Holiday_ref_no [_____________________]
Departure_date [_____________________]
Length_stay [_____________________]
Price [_____________________]
[ ADD ]

once you have filled in the fields it adds them details you input in them textboxes, to an array, where it holds that holiday. the array should allow me to add up to 50 holidays. if i add more than 50 it displays an error.
i added labels below the textboxes ( they will not be there in the final program) to display the holiday i added.
hope this helped understand what i mean
[ April 29, 2004: Message edited by: mo robertson ]
[ April 29, 2004: Message edited by: mo robertson ]
mo robertson
Greenhorn

Joined: Mar 29, 2004
Posts: 24
ok i found out why, it was because i was clearing the text fields before it. that was having some effect. however my array is letting me add as many holidays as i want, it should however max out at 50

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Project Problems - Help ASP
 
Similar Threads
How to show the data in JTable using RandomAccessFile as well add, delete, update function
Trying to convert jtextfields to a double
Custom ComboBox with icon
Pressing a button to open a new window
How to create hot key?