Tony Fabeets

Ranch Hand
+ Follow
since Dec 22, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tony Fabeets

String currentName;//contains first mid last name
StringTokenizer st = new StringTokenizer(currentName);
String token = st.nextToken();
char firstInitial = token.charAt(0);
int firstLength = token.length();
token = st.nextToken();
char midIni... etc;
it'd be easier to loop, but that should get you on the right track.
16 years ago
2 panels, one for each JTable.
panel 3 holds panel1 and panel2 (both JTables)
frame.setContent(panel3);
.validate() panel3 would refresh both?
correct me if i'm wrong on this one. not testing this in code.
16 years ago
Hola Joe
Tyler- Please post up the code in question.
16 years ago
not getting all the proper results, but have a good start. thanks for the help
16 years ago
Here's what i've come up with and still, nothing is true in the condition
if(stuObj.compare(i.next()) >=0)

[ February 16, 2004: Message edited by: Tony Fabeets ]
16 years ago
beginners mistake :-/
I now see how to compare if strings are equals, but would would i find whether to return -1 or 1?

the above code will not compile and the code below never lets the condition to add student be true. With all the code provided, nothing is added to list, but when i strip the add method down, as in the first post, everything works fine. So, we've narrowed the problem down, but not seeing where.
[ February 16, 2004: Message edited by: Tony Fabeets ]
16 years ago
above post edited accordingly
16 years ago
I figured out why null was being added. Was a problem with the calling method, as you suggested.
As of now, i simplified this method...

what i'm trying to make it do is
*Creates Student obj and adds it to DeansList if student has gpa >= 3.5
*return true if add is successful else reutnrs false
*If stuObj is added, add in ascending order via ssn within name
*use overriding compareTo iin Student class
*/
when i try to implement an iterator via

when i use that code, nothing is ever added to LinkedList DeansList. the condition if(stuObj.compareTo(listItr.next() >=0)
is never true.
my compareTo(Object) is as follows.

thank you
[ February 16, 2004: Message edited by: Tony Fabeets ]
[ February 16, 2004: Message edited by: Tony Fabeets ]
16 years ago

[ February 16, 2004: Message edited by: Tony Fabeets ]
16 years ago
Debugger show that stuObj was constructed correctly, but when added to DeansList, the DeansList gets an Object NULL.
16 years ago
I am trying to add objects into a linked list alphabetically if the gpa for that (Student) object is > 3.5. this is what i have so far, but it is not working. getting a no such element at the line Iterator i = DeansList.iterator();. Suggestions are appriciated

[ February 10, 2004: Message edited by: Tony Fabeets ]
16 years ago
I'm trying to add objects to a linkedList by the object value name.
i.e. joe is inserted after jane, but before keith.
as i run though the linked list with my iterator,
say stuObj.name = "joe"
how would i implement a condtion that if(stuObj.name should go before keith, but after jane)?
so far...

[ February 05, 2004: Message edited by: Tony Fabeets ]
16 years ago
build up action listeners for each button group and register each group to listener. if(action is an instance of button1)blah...
then do your calculations when you've gathered all the info.
[ January 29, 2004: Message edited by: Tony Fabeets ]
16 years ago
scope issue resolved.
[ January 27, 2004: Message edited by: Tony Fabeets ]
16 years ago
this is a mirror from tim's link. worth a once over
http://www.javaolympus.com/freebooks/FreeJavaSwingBooks.jsp
16 years ago