Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 22nd, 2008, 9:47 PM   #11
Fall Back Son
Hobbyist Programmer
 
Join Date: Oct 2006
Posts: 204
Rep Power: 2 Fall Back Son is on a distinguished road
Re: GUI problem.

oh, right, lol. thats embarassing. And thanks for the method name, I was obviously confused there at first. I will do that since I tried quickly rewriting something but it wasn't the source of the problem.

Also, note that if any of you runs this, it won't work, since the ArrayList isn't there from the other file or something of that nature.
Fall Back Son is offline   Reply With Quote
Old Jul 22nd, 2008, 10:16 PM   #12
Fall Back Son
Hobbyist Programmer
 
Join Date: Oct 2006
Posts: 204
Rep Power: 2 Fall Back Son is on a distinguished road
Re: GUI problem.

getPropertyName() gave me back "value", which doesn't tell me anything; I could have known that value was what was changing just because its what has to be changing in order to trigger the teamField source. I am going to look into more of the methods available, but I think it can't be solved using those methods...
Fall Back Son is offline   Reply With Quote
Old Jul 22nd, 2008, 10:22 PM   #13
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 825
Rep Power: 4 The Dark is on a distinguished road
Re: GUI problem.

This page: http://java.sun.com/developer/JDCTec.../tt0518.html#1 shows how to use an InputVerifier to check the contents of a field before allowing you to move off it. It might do what you want.
The Dark is offline   Reply With Quote
Old Jul 22nd, 2008, 10:28 PM   #14
Fall Back Son
Hobbyist Programmer
 
Join Date: Oct 2006
Posts: 204
Rep Power: 2 Fall Back Son is on a distinguished road
Re: GUI problem.

Thanks but I already found the error. But thanks for your help, it was definitely good since it told me what wasn't the problem. Sometimes knowing what the problem isn't is just as useful as finding out what it is.

Btw, I thought about the Formats, and ventured a guess and it worked. All I did was change where it says new JForTextField(new String()). I added the String part. lol. I have already done a lot of reading about this stuff so I was like wtf. But I didn't realize that you absolutely had to set up a specific format for the text field... I assumed it was String by default, and setting it up was for fancy stuff, like if you wanted the user to enter a date (thats one example they have)
Fall Back Son is offline   Reply With Quote
Old Jul 23rd, 2008, 1:09 AM   #15
Fall Back Son
Hobbyist Programmer
 
Join Date: Oct 2006
Posts: 204
Rep Power: 2 Fall Back Son is on a distinguished road
Re: GUI problem.

Ok I have another problem, one we already discussed. When it prints out the error message (Re-enter team name or whatever it says) the act of printing that out fires a PropertyChangeEvent. And that is definitely not what I want to happen. I can figure out ways around this, such as a simple variable, to just ignore the second PropChangeEvent. But is there any proper way of programming it so that it either doesn't fire a PropertyChangeEvent in that case, or something similar?
Fall Back Son is offline   Reply With Quote
Old Jul 23rd, 2008, 1:12 AM   #16
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 825
Rep Power: 4 The Dark is on a distinguished road
Re: GUI problem.

What about putting another text output next to (or below) the field and put the error message in that? It would be very frustrating to type in a team name, accidently transpose two letters, then have to type the whole name again because the program wiped out the name with an error message.
The Dark is offline   Reply With Quote
Old Jul 23rd, 2008, 1:30 AM   #17
Fall Back Son
Hobbyist Programmer
 
Join Date: Oct 2006
Posts: 204
Rep Power: 2 Fall Back Son is on a distinguished road
Re: GUI problem.

I mean... I already fixed the problem like I had said with the variable thing. I just added a counter. I was just wondering if there is a way to avoid this problem altogether, because I would think there would be something simple that I'm missing. I apologize if thats wasting your time to respond to a question which isn't really a problem, but I'm here to learn. I'm more concerned with doing things correctly than "ok, that works, so lets move on".
Fall Back Son is offline   Reply With Quote
Old Jul 23rd, 2008, 1:59 AM   #18
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 825
Rep Power: 4 The Dark is on a distinguished road
Re: GUI problem.

I would have done it with a variable flag, same as you. There may be a proper way to switch off the PropertyChangeEvent firing altogether, but I don't know of it. I hadn't even heard of a PropertyChangeEvent before this thread.

I was just pointing out that overwriting a user's input because they made a mistake is not going to win any user-friendliness awards.
The Dark is offline   Reply With Quote
Old Jul 23rd, 2008, 2:38 AM   #19
Fall Back Son
Hobbyist Programmer
 
Join Date: Oct 2006
Posts: 204
Rep Power: 2 Fall Back Son is on a distinguished road
Re: GUI problem.

Oh, I see what you mean. Well since I am doing this for free... and the input that is going to be there is going to be short, probably one word... I'm not concerned. This is one section of a much larger project. I will post the project on this site once it is finished. Maybe. Because I'm writing it for free since its for my mom. But if there's a possibility of selling it to others she knows, once I refine it, then I'll do that.
Fall Back Son is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Challenging Programming Problem - "Pinball Ranking" Sane Coder's Corner Lounge 38 Jan 15th, 2008 5:16 PM
Problem solving ReggaetonKing Software Design and Algorithms 7 Jan 4th, 2008 1:49 PM
Storing BLOBs in a database - problem jonyzz Other Programming Languages 8 Jan 31st, 2007 4:38 AM
Changing icons problem Pedja C# 8 Mar 25th, 2006 8:03 AM
cgi/perl script + IE problem joyceshee Perl 2 Jan 24th, 2006 11:10 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:58 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC