Forum: Java Nov 5th, 2008 |
| Replies: 2 Views: 684 Hello everyone. I wanted to know how I could create a simple time restriction variable. For example making private double hour; not go over 2:59. Basically I don't want someone to be able to input a... |
Forum: Java Aug 26th, 2008 |
| Replies: 1 Views: 1,020 Hello everyone. I was having a bit of a problem with printing out a text file using Formatter. Whenever my program writes to a file it prints everything on one line and when I type \n it prints out a... |
Forum: Java Jul 15th, 2008 |
| Replies: 5 Views: 487 Thanks alot. It helped. The part where I need a boolean array is to show a seating chart on the plane and have it show which seats are available. I think I'll be able to take it from here. Thanks... |
Forum: Java Jul 15th, 2008 |
| Replies: 5 Views: 487 How can I go about doing so. Arrays are my weakest areas. I have the Java How to Program Seventh addition book which goes into details about arrays but doesn't have an example where it actually asks... |
Forum: Java Jul 15th, 2008 |
| Replies: 5 Views: 487 Hello everyone. I'm currently having a problem with choosing one area in an array. For what I'm working on I'm trying to pick one seat in an array consisting of 10 seats. The first 5 seats are... |
Forum: Java Jun 2nd, 2008 |
| Replies: 7 Views: 932 Thanks alot. Sorry I angered you. I didn't know I had to add that (String) to it. That's where I was messing up. Now the proram works fine. Thanks again. |
Forum: Java Jun 2nd, 2008 |
| Replies: 7 Views: 932 Hello guys. I asked a week ago about how to write information selected from a jcombobox to a separate datafile. I've tried numerous things and have been unsuccessful. I've been at it for about a week... |
Forum: Java May 29th, 2008 |
| Replies: 2 Views: 580 Thanks. I didn't add everything because it was an example I just made to show what my problem is. On my original version I have the output location and file done. Just having a problem with... |
Forum: Java May 28th, 2008 |
| Replies: 2 Views: 580 Currently having a problem with adding data so that if someone selects something like an add button, it keeps adding the data, like a person's name, age and grade. Then when they select Enter, all... |
Forum: Java May 28th, 2008 |
| Replies: 4 Views: 575 I understand it better now. Thanks! |
Forum: Java May 28th, 2008 |
| Replies: 4 Views: 575 How can I go about doing that. I've been searching and I'm currently unable to find the answer. I'm familiar with setting arrays of the same type, but when they're different, that's where I'm lost. |
Forum: Java May 27th, 2008 |
| Replies: 4 Views: 575 How can I store variables in an array. With a mixture of strings, variables and information entered in textfields. With what I have below. If I wanted to store numbers, price, total, tax, and name in... |
Forum: Java May 25th, 2008 |
| Replies: 7 Views: 932 I was unable to reach the first link. I think it's down. Also the only other one I can see apart from getSelectedIndex()is getSelectedItem(), and that doesn't work as well. |
Forum: Java May 25th, 2008 |
| Replies: 7 Views: 932 Hello guys. I wanted to know how I can go about writing what is selected in a Jcombobox to a datafile. This is an example of what I'm trying to do but when I compile i get an error. How can i correct... |
Forum: Java May 23rd, 2008 |
| Replies: 4 Views: 501 I found out what I had to do. It's lame when you find out you make the simplest of mistakes. I needed to add an extra line newtotal = total;. Then everytime i pick the total button it adds the old... |
Forum: Java May 23rd, 2008 |
| Replies: 4 Views: 501 I tried newtotal; instead of newtotal = 0; also and it didn't work. |
Forum: Java May 23rd, 2008 |
| Replies: 4 Views: 501 Hello guys. I'm having a bit of difficulty with adding totals. I know how it's suppose to work but I'm not seeing what I'm doing wrong. If I want to add my total each time I hit the total button how... |
Forum: Java May 22nd, 2008 |
| Replies: 3 Views: 699 Thanks again Ezz. You've really helped me out. |
Forum: Java May 21st, 2008 |
| Replies: 3 Views: 699 Hello once again everyone. I would like to know if anyone could assist me on how to insert text from a JFormattedTextField and an item from a JComboBox and place them into a JTextPane. If the user... |
Forum: Java May 20th, 2008 |
| Replies: 8 Views: 963 I apologize. I got it to work and found out what my problem was lol, but how would I use the trim() method, just for the extra knowledge. I really appreciate the help, I've been stuck on the name... |
Forum: Java May 20th, 2008 |
| Replies: 8 Views: 963 Sorry to bother you again. I've never used the trim method. How can I get that to work with the code you posted, as an example. I've implemented all the code and it compiles well but when I run the... |
Forum: Java May 20th, 2008 |
| Replies: 8 Views: 963 I tried the above code but couldn't get it to work properly. Is txtMask required or is that suppose to be the name of my JFormattedTextField? If so I'm still getting an error when I compile. How can... |
Forum: Java May 20th, 2008 |
| Replies: 8 Views: 963 Think someone marked my question as solved but I'm still in need of help. |
Forum: Java May 19th, 2008 |
| Replies: 8 Views: 963 Hello. I asked last week about how to allow the user to only enter in letters. I tried the mask formatter but that's too limited. How can I go about letting the user to enter in any kind of letters... |
Forum: Java May 17th, 2008 |
| Replies: 4 Views: 1,686 Thanks a lot. Everyone on here has been so helpful. I can't wait until I get to the stage where I'm able to help others. |
Forum: Java May 16th, 2008 |
| Replies: 4 Views: 1,686 I wasn't able to figure it out. Whenever I did the public String toString() { return name; }
I would get an error message. Maybe I'm doing it wrong but I wouldn't know if I am. From the example I... |
Forum: Java May 16th, 2008 |
| Replies: 4 Views: 1,686 Hello. I'm having troubles with my JComboBox calculations. For example, if the strings in my JComboBox were String[] name = { "John", "Tom" }; And Tom was assigned 15% to his name. How can I have the... |
Forum: Java May 14th, 2008 |
| Replies: 0 Views: 556 Hello. I now know how to allow the user to enter only numeric input in a FormattedTextField. What I need help with now is how to allow the user to only input letters. An example is what I have below.... |
Forum: Java May 12th, 2008 |
| Replies: 8 Views: 1,540 I looked through it, worked perfectly. Thanks alot for the help! |
Forum: Java May 12th, 2008 |
| Replies: 8 Views: 1,540 I tried some of the codes out and still couldn't find a solution. I'll give an example of what I'm trying to do. If I have a field named "JTextField num= new JTextField(10);", how can I make this... |
Forum: Java May 12th, 2008 |
| Replies: 8 Views: 1,540 |
Forum: Java May 12th, 2008 |
| Replies: 8 Views: 1,540 May I get an example of how I would do that please. I don't know how to set up constraints at all. I don't really need it for what I'm doing but it would save me some trouble from throwing... |
Forum: Java May 12th, 2008 |
| Replies: 8 Views: 1,540 Hello everyone. I had a quick question. How can I go about setting constraitnts for a JTextField. I'm trying to not allow users to enter any non numeric numbers, except for dollar signs, commas and... |
Forum: Java Apr 19th, 2008 |
| Replies: 7 Views: 1,247 This is a sample code that i just made to show you guys what my problem is. In my mind I know how the calculating should work, like I described earlier. My problem is actually implementing it in... |
Forum: Java Apr 19th, 2008 |
| Replies: 7 Views: 1,247 I'll go ahead and post it up in a few. Thanks for taking the time to help me out. |
Forum: Java Apr 19th, 2008 |
| Replies: 7 Views: 1,247 Yea that's what I'm trying to do, but implementing it in code is what I find difficult. |
Forum: Java Apr 19th, 2008 |
| Replies: 7 Views: 1,247 I have an important question at the moment. I wanted to know how I can go about multiplying or adding checkboxes to display information on a label. For example if I have 3 checkboxes labeled... |
Forum: Java Apr 12th, 2008 |
| Replies: 3 Views: 1,155 Sorry I mistakely removed it. This is it again but fixed up. Just need to know how I can make it more simple.
public class checkbook
{//begin class
public static void main(String[] args)... |
Forum: Java Apr 11th, 2008 |
| Replies: 3 Views: 1,155 I figured it out. I misspelled deposited twice in the program lol. But if you guys can help me out with making the code simplier, please let me know. |
Forum: Java Apr 11th, 2008 |
| Replies: 3 Views: 1,155 Hello guys. I needed some help with my calculations. I'm having a problem with having my output display the total amount. I believe the problem is coming from trying the float calculation. |