From leavens@cs.iastate.edu Tue Sep 30 14:36:13 2003 Date: Tue, 30 Sep 2003 14:35:18 -0500 (CDT) From: Gary T. Leavens To: Ivan Rosales Cc: Staff for Com S 362 Subject: Re: Homework 4 question Hi Ivan, On Tue, 30 Sep 2003, Ivan Rosales wrote: > Are we allowed to use our own containers in this interfaces homework? I > am more comfortable with a different object for user interfaces, > particularly the JLayeredPane container, I prefer using one of these > over an entire frame, and setting coordinates of objects such as in a > Visual C++ form, or a VB form. Apparently a JFrame "automatically has a layered pane" called the root pane. So I think it's okay to use that if you like. See http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------------ From leavens@cs.iastate.edu Sat Oct 4 08:29:47 2003 Date: Sat, 4 Oct 2003 08:27:50 -0500 (CDT) From: Gary T. Leavens To: Travis Johnson Cc: Com S 362 students and staff -- Brett Graves , Bradley Deem , com_s_362@cs.iastate.edu, Dalei Li , Hamdan Al-Mehrezi , Les Miller , Marie de Furio , Michael Taylor , Nick Ransom , Russ Uthe , Travis Johnson Subject: COMS 362: Re: ui-use-cases.txt?? Hi Travis, On Fri, 3 Oct 2003, Travis Johnson wrote: > I can't find the file ui-use-cases.txt. I go to the directory specified > in hw4.txt, but the only thing in it is the Calculator directory. Am I > looking in the wrong place or is it missing or what? Sorry, the file /home/course/cs362/public/homework/hw4/ui-use-cases.txt was not there before, but it is now. You can also access it through http://www.cs.iastate.edu/~leavens/ComS362/homework/hw4/ui-use-cases.txt -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------ From leavens@cs.iastate.edu Sat Oct 4 18:33:18 2003 Date: Sat, 4 Oct 2003 18:30:43 -0500 (CDT) From: Gary T. Leavens To: Com S 362 students and staff -- Brett Graves , Bradley Deem , com_s_362@cs.iastate.edu, Dalei Li , Hamdan Al-Mehrezi , Les Miller , Marie de Furio , Michael Taylor , Nick Ransom , Russ Uthe , Travis Johnson Subject: COMS 362: 362 exercise for Monday postponed until Wednesday, feedback responses Hi all, Due to the course feedback, I've changed the due date on the exercise for Monday to Wednesday (see why below). The following is a summary of the in-class feedback I received from you all on October 3, 2003, by asking about things the staff should "stop", "start", or "continue" doing. In response to these comments, the main changes I plan to make are as follows. - Stop assigning exercises and homeworks that are due on the same day. - Watch for exercises that are too long or time-consuming. Other more minor points are noted in my responses below. In what follows, by have categorized and rephrased a bit some of the feedback so I could understand it better. I have noted where several people have the same comment, and give those more weight. I appreciate the feedback. My responses appear underneath each item. In some cases, the response will take me some time to implement. Lectures - Start posting class notes on-line It may surprise you to know that I'm already doing this. You can find a lecture notes from the course web page. These come in two flavors. The first is the "meeting-outlines", which are designed for taking notes in a way that is interactive. Many students find these helpful during class for taking notes. They are accessible from several places on the course web page, however I think that the most easy way to access them is from the syllabus web page. If you click on the name of a unit, that should take you to the relevant meeting outlines text file, which you can print. The full course lecture notes are also available, exactly what I use in class. However, I don't recommend these for use during class. Instead of I recommend that you use the meeting-outlines for taking notes. Nevertheless, if you must miss a class (hopefully for some good reason), you may find the lecture notes helpful. However, notes that they are designed for my use, and may be somewhat difficult to decipher. - Continue working [code] examples in class (9 people) ("it makes the concepts more concrete"). ("The GUI stuff lately has been helpful") ("laptop demonstrations -- very helpful") - Stop spending so much time typing examples in class on the laptop (2 people) ("I learned more from lectures and taking notes.") It's not often I can satisfy two contradictory pieces of advice with the same answer, but I think I can do it in this case. I take you use to mean that several people thought the in class code examples were helpful, but others don't want to continue the practice. Basically, we won't be doing more Java coding examples on the computer in class. I will present some more code to demonstrated some principles (later in the course), but we won't be entering them into eclipsed during class. - Start explaining code more (2 people) ("lots of times I feel very lost") It sometimes hard for me to judge when people are following or when they are lost. Feel free to say that you would like me to go over some code in a different way, and I'd be happy to do that. - Continue using the handouts of code in class - Start including more documentation on code handouts, and connect them better to what is discussed in class (2 people) ("stop handing out papers with partial source code from a complex program. It's like getting a few pieces to a puzzle that don't fit together and you don't know where they go.") ("Start to hand out or post small, completed programs with source code") I will continue to give handouts for code to the don't have to try frantically write-down large pieces of code during class. I admit that the handout used in the GUI example was a bit disconnected. I'll try to improve that next time and watch out for others that are similar. Note that the GUI example we worked in class is all put together as part of homework 4. - Stop working at the code level until concepts which dictate the code are more fully understood It's not easy to deal with this problem. There's a kind of circularity in the concepts and code that we have to approach somehow. I did try to give a brief overview of the concepts on the first day of class. And when we started talking about polymorphism and inheritance in Java, I also tried to give a bit of background and motivation for them. But the main thing is that we will come back to these issues we have touched on already from a different point of view again during semester, hopefully spiraling in a way that will increase your understanding of them. - Start explaining things regarding homework better. ("when I go to do the homework I find I can't do it.") Please feel free to come and see us during office hours, or send an e-mail to the course staff if you're having the feeling that you don't know how to start on the homework. Another thing to do is to go back over the readings. You may find that the reading material after class is more helpful, because it will be a second (or third) exposure to the material. - Continue encouraging discussions in class (3 people) ("I have learned a lot from the experience and inputs from other students") I will continue to do that. - Start talking, at least briefly, but other OO languages, besides Java. I'll try to do that. I think I have mentioned C++ several times in the course, but I realize we have concentrated on Java because I expect the most of you already know C++ somewhat. - Stop copying from [his lecture notes] I think this semester I have done far less of that than usual, because of the exercises. However, there are times when I do copy things from my lecture notes on the board, because I have spent some time preparing them, and because I don't want to make mistakes :-). If the things I write on the board are short, and if I believe that you will be helpful for your learning to copy them, I think that might be more effective than give you a printout that you might easily ignore. If it's a long program, however, I tend to just give you a copy of its instead of having you write it all out. So I don't plan to change anything for this. - Apply the concepts to more examples I hope that we will be doing this during the semester. - Start writing more on the board, and explain what is occurring and what is being discussed I'll try to do more of that. - Start lecturing more If you ask more questions, I will give more short lectures in response to them. However, I want to encourage more dialogues of people don't fall asleep or otherwise tune out, which tends to happen if I lecture straight for long periods of time. - Start accepting other design patterns and styles of code when they are not truly wrong. I'm not sure exactly what this is referring to. I generally try to be fairly accepting of suggestions, but also to be clear about what my opinions are. Course workload, in general - Stop doing the exercises if there will be too much work with both homework and team projects. (2 people) ("I'm a little worried about the amount of work involved in completing the exercises, homeworks, and occur project. The balance seemed pretty good when we were doing just the homework and exercises, but I wonder if the project was things a little too far. So I guess I'm thinking maybe the exercises should stop, but there might be a way to keep it all balanced without doing that.") We generally won't have both individual and teamwork at the same time going on. Most of the rest of the semester will be mostly teamwork, although the some individual assignments, those will not be running concurrently with the teamwork, as a general rule. Given the largely positive response to the exercises, I plan to continue those. - Stop having exercises due the same day as a homework (5 people) ("or around test dates") I'll do that. - Reduce total number of exercises per week (2 people) Think it's best to have an exercise for every lecture, if that works in the schedule. Otherwise we will have just a straight lecture some days. - Stop making exercises too long or too time-consuming (4 people) - Stop trying to assign to much material in too short a time (3 people) ("Try to keep time commitment under nine hours/week") (" This class is becoming overwhelming") I admit that a few times the exercises have been overly long. Especially the one with the singleton pattern and factory pattern. I'm trying to keep an eye on this. However, classes like this should have a significant amount of homework, because there's no other good way to learn the material. - Continue teaching the material, which is good and should not be cut back. I plan to do that. Exercises - Stop assigning exercises (3 people) ("in trying to answer questions about [an exercise code are code before we were taught [about it] just frustrated me more than anything.") - Continue using the exercises (13 people) ("It forces me to look at the book.") ("It forces the class to stay together") ("Exercises based on attempting, rather than correctness, are good. They help people prepare for lectures without being totally unfair.") ("the exercises are very helpful in continue to reinforce participation and keeping up on a daily basis") ("they are motivation to learn material before it is covered in class") I'm happy with the mostly positive response to the exercises, which was the thing I was wondering most about in this feedback. I realize this can be frustrating at times, but it seems that on the balance most people think it has a positive effect on their learning. I will try to make it so that we don't have exercises due the same day as a homework. - Stop spending so much time on exercises, unless they are really important I'm trying to coordinate the exercises so we achieve that kind of effect. This will take some practice, because I haven't done this before. I appreciate your patience in bearing with me on this. - Start giving a brief lecture on the topics for an exercise before it's due. I can try a little bit of this, but I'll only deal to spare about a minute or so the give a very brief overview of what might be coming in the next exercise. But we'll try to see how that works. - Stop making exercises due when we won't get to them (2 people) ("we seem to do exercises several days before talking in class" [about them]) This is my fall for not being able to predict precisely when we will get to some topic in lecture. I think it's best to postpone the exercise to the appropriate spot so that it fits in topically. But I'll try to make sure it doesn't happen often. - Start putting the exercises on the page linked to the home page, rather than linked through the syllabus. I wanted to have the exercises linked to the syllabus, so that I have more flexibility in rearranging topics at a future date. However, I have now made the exercise directory available from the home page. Usually, also, the exercises are always in the news items. - Start making the exercises more clear. I'll try to do that. It may be, sometimes, that the exercises don't seem clear because they are about topics which you don't know about until you did readings. But I'll work on that. Homework - Continue going over the vocabulary and parts of the homework [in class] Ok. - Start making the homework assignments accessible from the syllabus I have now linked the homework to the syllabus in the same column that the exercises are in. - Stop making homework that is too long and too difficult (It's hard to learn the Java, HTML, Eclipse, at the same time as doing the other parts of the homework) I admit there's a bunch of things you have to learn quickly at the beginning of the course. The department is trying to switch to Java for introductory classes, which will make this less of a problem in the future. Exams - Continue using open book exams Yes, that's my philosophy. - Start having more practice tests I don't have time for making up more practice tests the semester. However, you can get the old exams from previous semesters from the web page, and use those as practice. Grading -Stop being so picky in exam grading (taking off for each forgotten "private") I think that declaring fields to be private is an important thing, for information hiding. We graded the exams consistently in this respect. - Stop being too strict in grading ("2 points out of 40 for not having the exact same error messages? Seems a bit ridiculous.") I think that following specifications exactly is very important for software development. Again we graded homework consistently in this respect. - Stop using the team grading system, where we grade each other.... You misunderstand the team grading part of the grading policy. You don't grade each other, but you did have to agree together on a waiting for your grades, which has a slight effect on the grades. Please read the course grading policy. Miscellaneous - Start bringing cookies to class. (2 people :-) I'm on a diet :-) - Start providing more information about how the TAs can be reached. - Start involving the TAs in the class more The TA contact information is on the course web page. - Stop requiring us to read so many different books I don't plan to make any changes in this respect. I think it's important for youth realize that you can get everything you need to know from a single textbook. The more book to read, will more you'll learn about the subject matter, and this will help you in your career etc. - Continue being flexible in altering the syllabus. (2 people) - Continue pushing assignments back if we don't have time to go over them Yes, this is my policy. - Start allowing students to pick the size and number of members in their groups. I think it's important to require a reasonably uniform size for the team's in the class, otherwise grading won't be fair. So I don't plan to make any changes for this. -Continue doing what you are doing now [or everything else]. (8 people) ("the expectations are well-defined") ("I think the class is very well run.") Ok. - Continue to be excited about Java Ok. - Continue maintaining a very useful and up-to-date web site Ok. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 From leavens@cs.iastate.edu Sat Oct 4 21:20:27 2003 Date: Sat, 4 Oct 2003 21:20:11 -0500 (CDT) From: Gary T. Leavens To: Jia%2dZhen %2c Lee Cc: Staff for Com S 362 Subject: Re: Com S 362 GUI homework hi Jia-Zhen, On Sat, 4 Oct 2003, Jia%2dZhen %2c Lee wrote: > i was wondering for the GUI calculator homework, are there any guidelines as > to which fields should be explicitly private ( the bottom of the code) and > which fields are left as default ( eg. the JLabel objects declared throughout > the CalculatorFrame.java code). It seems as if the JLabel objects (eg. > fclabel) should be just as hidden as say a JTextField (which is private in the > code). > You should make all the *fields* you declare private. But note that fclabel is a local variable. Local variables are only accesible in the block in which they are declared, but you can't write "private" (or protected or public) on their declarations. If you refactored to make that a field, you would make it private. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------------------- From leavens@cs.iastate.edu Sun Oct 5 10:41:43 2003 Date: Sun, 5 Oct 2003 10:39:14 -0500 (CDT) From: Gary T. Leavens To: Travis Johnson Cc: Staff for Com S 362 Subject: Re: JLabels Hi Travis, On Sat, 4 Oct 2003, Travis Johnson wrote: > Professor Leavens, > > Why is it that some of the JLabels are declared as private fields, and > others are initialized as variables during construction of the > CalculatorFrame? For example, regLabels is a private field array of > JLabels, while nfLabel and regsLabel are initialized in the > CalculatorFrame constructor. There's no particular good reason for the inconsistency. They could all be fields or local variables. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------------------ From leavens@cs.iastate.edu Sun Oct 5 10:46:40 2003 Date: Sun, 5 Oct 2003 10:46:19 -0500 (CDT) From: Gary T. Leavens To: Travis Johnson Cc: Staff for Com S 362 Subject: Re: Altering BinaryFormulas? Hi Travis, On Sun, 5 Oct 2003, Travis Johnson wrote: > Are we allowed to alternate the three BinaryFormulas? I need them to > have toString functions for displaying the text version of the formulas > in the named formulas text field. I could do it manually in one of my > GUI classes, but I can't tell which registers are being operated on in a > given instance of a BinaryFormula because the methods that return those > values are protected. Or am I going about this the wrong and I should > be doing something else completely? You can certainly add additional methods to any of the classes that you need to make things work. In particular, I think it's always a good idea to have any reasonable toString method, if only for debugging purposes. It's better to put them in the formulas, to follow the "expert" grasp design pattern. You can add additional uses of the polymorphism and template method patterns to make it easier to write such things without duplicating code. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ----------------------------------------------- From leavens@cs.iastate.edu Sun Oct 5 16:00:32 2003 Date: Sun, 5 Oct 2003 15:58:59 -0500 (CDT) From: Gary T. Leavens To: Ivan Rosales Cc: Staff for Com S 362 Subject: Re: homework 5 Hi Ivan, On Sun, 5 Oct 2003, Ivan Rosales wrote: > Are we allowed to rewrite homework 5 with a JLayeredPane? Currently it > is using a regular Container class with a layout manager. With the > JLayeredPane, as you are aware, components are independent of each > other. So, components can be added using (x, y, width, height) > parameters onto the pane. I think this sort of method is much easier and > easy to extend. I do not have experience with the GridBagLayout, but it > is particularly frustrating, because each column is dependent on the > others. Getting things aligned so far has been nothing more than a > frustrating system of modifying the coordinates sent to the add() > method. Yes, you can do that. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------- From leavens@cs.iastate.edu Sun Oct 5 16:00:42 2003 Date: Sun, 5 Oct 2003 16:00:18 -0500 (CDT) From: Gary T. Leavens To: Sihyun Lee Cc: Staff for Com S 362 Subject: Re: cs362: hw4 question... Hi Sihyun, On Sun, 5 Oct 2003 crazyabe@iastate.edu wrote: > Can I change stuff in Calc package? Yes. You can, for example, add toString methods. > and When I turn in the homework, > if I change anything in the calc package, > I should print them and turn in also, right? Yes, and include it in the jar files. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------- From leavens@cs.iastate.edu Sun Oct 5 16:03:09 2003 Date: Sun, 5 Oct 2003 16:02:52 -0500 (CDT) From: Gary T. Leavens To: James Gries Cc: Staff for Com S 362 Subject: Re: Eclipse in Linux Hi James, On Sun, 5 Oct 2003, James Gries wrote: > Where do I import JUnit into Eclipse on the Linux machines? I think the jar file is in /opt/junit/junit.jar. See http://www.cs.iastate.edu/~leavens/ComS362/running_java.shtml#linux for details. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 -------------------------------------- From leavens@cs.iastate.edu Sun Oct 5 16:05:16 2003 Date: Sun, 5 Oct 2003 16:05:03 -0500 (CDT) From: Gary T. Leavens To: Travis Johnson Cc: Staff for Com S 362 Subject: Re: How should we handle... Hi Travis, On Sun, 5 Oct 2003, Travis Johnson wrote: > This should be my last question about this assignment. Do we have to > worry about the user doing things to screw up our calculator? For > example, do we have to do something special if the user uses the same > formula name more than once? Right now, my named formula box will just > take multiple formulas with the same name, and because of the way the > FormulaMap works, only the last one saved will be the one recalled. I think you can claim that is a feature, as it allows one to "edit" formulas. So it's okay to have that behavior. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 --------------------------------- From leavens@cs.iastate.edu Sun Oct 5 19:39:02 2003 Date: Sun, 5 Oct 2003 19:36:30 -0500 (CDT) From: Gary T. Leavens To: Jeff Groves Cc: Staff for Com S 362 Subject: Re: Save Formula Setups After Shutdown? Hi Jeff, On Sun, 5 Oct 2003, Jeff Groves wrote: > Do you want us to save the Formula Setups in another file so that the user can > shut down and restart the program and still have them saved? No, that's not necessary. (You can do it if you want for your own edification, however.) -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ---------------------------------------- From leavens@cs.iastate.edu Mon Oct 6 00:04:14 2003 Date: Mon, 6 Oct 2003 00:04:00 -0500 (CDT) From: Gary T. Leavens To: Jeff Groves Cc: Staff for Com S 362 Subject: Re: question on listeners Hi Jeff, On Sun, 5 Oct 2003, Jeff Groves wrote: > Okay, so now I'm having trouble working listeners in. I figured that since > listeners merely separate the GUI from the data crunching, I'd only need one > more listener (for the Evalutate button); everything else is just concerned > with changes within the GUI. However, I can't see how to do that, so now I > think that I have to use listeners for every function (the Save & Reset ones > as well). However, those don't seem to be working, or at least updating the > fields they're supposed to. Follow the examples in the Java tutorial, or what we did in class. > How many of these things do I need? Often, as you note, one listener is needed for each action; this is because different methods are required to take action for the same event; as you note, for example, the save button and the reset button will probably have different listeners, but both implement the actionPerformed message. On the other hand, sometimes a single object can listen to multiple events if it can implement multiple listener interfaces. This is sometimes necessary for different actions to communicate with each other, as we did with the RegisterInputListener class. > Am I even using them right? I can't tell the details, but it sounds like you're on the right track. > Is there any simpler way of causing such-and-such to happen if the button's > hit? No, you have to use a listener. > Is all of this supposed to be contained in the construction class of the frame? You can make new classes if you wish. Don't hesitate to do that if that helps you. Or if you want you can use Java's anonymous inner class mechanism to avoid having separate files. Either way is fine. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------------------- From leavens@cs.iastate.edu Mon Oct 6 08:43:50 2003 Date: Mon, 6 Oct 2003 08:43:25 -0500 (CDT) From: Gary T. Leavens To: Jeff Groves Cc: Staff for Com S 362 Subject: Re: question on listeners Hi Jeff, On Mon, 6 Oct 2003, Jeff Groves wrote: > I just hope that you cover every Listener we would need. This stuff is damn > confusing. I can't tell what I'm supposed to call with Listeners. Are they all > supposed to be tailor-made for the CalculatorFrame class? I'm not going to discuss Java listener details any more in class. But the trick is that you don't call a listener directly, the system calls it. E.g., when focus is lost, it calls the focus lost listener's method. See the readings recommended in the homework. > Are you supposed to > call functions in the CalculatorFrame class from them, or is that violating > something? I'm not sure what that means exactly. You make a call to add your listener object, and then when the event happens the system calls the appropriate method of your listener. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ---------------------------------- From leavens@cs.iastate.edu Mon Oct 6 10:09:37 2003 Date: Mon, 6 Oct 2003 10:09:22 -0500 (CDT) From: Gary T. Leavens To: sayanr@cs.iastate.edu Cc: Staff for Com S 362 Subject: Re: COMS 362: 362 exercise for Monday postponed until Wednesday, feedback responses Hi Sayan, On Mon, 6 Oct 2003 sayanr@cs.iastate.edu wrote: > I have two questions regarding the HW4 > > 1. Do we need to make a jar file only for the gui package or for > the whole Calculator package? It's okay either way. But if you changed anything in the other packages, be sure to include that code. > 2. There is a setOutput() method in the CalculatorFrame class but I > couldn't figure out how to use it. Is it compulsory for us to use > that method ? No. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------------------- From leavens@cs.iastate.edu Mon Oct 6 22:16:06 2003 Date: Mon, 6 Oct 2003 22:15:43 -0500 (CDT) From: Gary T. Leavens To: Adam Nelson Cc: Staff for Com S 362 Subject: Re: HW 4 Question Hi Adam, On Mon, 6 Oct 2003, Adam Nelson wrote: > Sorry to bother you again, but I have one more thing I need help with. > > How can I get changes in the JComboBox in the Named Formulas section to change > the textbox that shows the formula? I imagine it involves some type of > listener(maybe an Item listener), but I'm having trouble figuring out how to > get it to work. You have to call the textbox's setText method with the string you want to display in it, when the actionPerformed event is received (i.e., when that method is called). -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 -------------------------------- From leavens@cs.iastate.edu Tue Oct 7 15:45:31 2003 Date: Tue, 7 Oct 2003 15:39:04 -0500 (CDT) From: Gary T. Leavens To: Adam Nelson Cc: Staff for Com S 362 Subject: Re: HW 4 Question On Tue, 7 Oct 2003, Adam Nelson wrote: > All right. I guess I do need to ask another question. How can I get the > register numbers that the formula's box needs? > > I have figured out how to find the type, but not how to convert it into the > operator symbol. You will need to define a toString method in the BinaryFormula classes to get the string. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580