Mandy Bowman

Ranch Hand
+ Follow
since Jan 24, 2007
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Mandy Bowman

Hi just thought I'd start a general comments thread. I just wanted to say that when I first looked at the specification I didn't have a clue how to do it and now that I see what it is all about it is making more and more sense to me.
Hi all,

I was wondering what unit testing tools are available. I have not done any unit testing so far but I think I should. I'm using NetBeans 5.5.1.
Oh I see now. I was thinking on some other lines though. What I'm wondering is whether our read methods need to lock the record we want to read since just before we call read we lock the record anyway.
Hi Jim,

I must say I never thought of what you just decribed. It was very educational. It makes me wonder whether the Vector class is Thread-safe at all then by definition.
Strictly speaking though is this needed:

1) Lock record
2) Read the record to check that it hasn't been booked
3) Update the record to indicate that it has been booked
4) Unlock record
I guess that's even better. Are we required to do this much work though?
A question about updateing records. In B&S we are meant to book contractors. Now this involves geting the record number of the record you wish to update and then calling update(recNo, data) to update that record so that it gets booked. Now I can see two ways in which to get the data that we want to update. The first is to get the data from the selected row in the JTable and the second is to make a call to the server to re-get the data from the database. I prefer the second option as this would mean that we are getting the most up to date information from the server (there could have been chages to that record since your search). Does anyone disagree?
Hi all,

a question about threadsafe classes. In order to make a class threadsafe is it enough to make all the methods in it synchronised or is there more that you need to do?
i am using setPrefferedSize and pack but as i understand it setPrefferedsize is not always adhered to by swing.
10 years ago
hello all,

another couple of questions about B&S bookings.

One thing I'm assuming (and I'm sure it's a sensible assumption) is that if a record is already booked then a client cannot book it. If anyone thinks differently please let us know.

The other issue I'm having is that in the customer id field of the record the customer wants to book we are supposed to store an 8 digit number (representing the customer id). The question is where does this number come from? How do we generate it?

Amanda
hello all,

in B&S it is stated that we must allow the user to book a seleced contractor. Question is with a JTable we can select more than 1 line. In this case have you all allowed multilple bookings with a single click or do you only allow one contractor to be booked at one time?
ok assume that the outer frame uses borderlayout and the panel that it contains also uses borderlayout but the two panels that it contains both uses flowlayout to arrange the textboxes, buttons etc in them.
10 years ago
Hi all,

In building a GUI there are various methods for setting the sizes of components. For instance setSize, setPreferredSize, setMaximumSize, setMinimumSize and what I was wondering is which components is one meant to set the sizes for and which methods does one use and when. For instance if I have a frame that contains a panel (that is as big as the frame) which contains 2 panels which each contain buttons, textboxes and such which of these components do we set sizes on and what methods do we use. How do we decide? Currently, what I do is do whatever seems to work after lengthy trial and error.

Mandy
10 years ago
Hello everybody,

Just a quick question. I realised a potential issue with searching. When a user searches for a records the system has to call find(String[] criteria) which returns a list of ids of contractors. Then in order to actually display the details of these contractors the system has to, for each contractor, call read(int recNo) which returns a String[] of the data for that contractor. The problem is if we have 10 calls to read(int recNo) and we make the first call and the server swaps us out then it is possible that although prior to your call that contractor was not booked he could get booked by the thread that swapped you out. If this happens then when the JTable is displayed for you the current state of affairs will not be represented. I doubt we need to do anything about this but it is an issue.