Bridget Kennedy

Ranch Hand
+ Follow
since Nov 30, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Bridget Kennedy

Paul Clapham wrote:

Charles Sexton wrote:How would you disable mouse drag or the selection of multiple rows when the mouse is dragged? I can select the whole list with a mouse drag and I don't really want to be able to do this.



As for your original question: Why is it a problem that you can select rows that way? Surely you aren't accidentally dragging the mouse over the table and selecting rows you didn't mean to select?

I ask because it's often difficult to disable part of the normal functioning of a component. So if there isn't a serious need to answer this question, I would just leave it to work the way it works now.



Actually, I have a need to do this, too. In my case, I always want the drag gesture to be processed as a part of a drag-and-drop sequence. I do want the user to have the ability to select multiple rows through control- or shift-click, but mouse drag is the prelude to drag-and-drop. As it is, sometimes the drag gesture is interpreted as a multi-row select prior to handling the drag gesture event. It seems you have a choice of either single-select, or ambiguous drag-and-drop processing.
8 years ago
Newer sad movies:

Kite Runner
The Painted Veil
Gone Baby Gone

Documentary:

Born Into Brothels
15 years ago
New development.

How interesting it will be if a single person halfway around the world provides the catalyst for change.
15 years ago
This is an example of a ternary operator.

Here is another good description.
[ October 20, 2008: Message edited by: Bridget Kennedy ]
15 years ago
...and the light switch is turned on.

Thank you very much for your time, Stevi.
15 years ago
Thank you for your patient response, Stevi.

Sorry to be so dense. I does make sense that HOUR_OF_DAY would not change from 1 to 1 when when I'm setting it to 1. However, I do not understand why HOUR_OF_DAY = 1 in the first place when it looks to me like it should be 20. Nor do I understand, in the second case, why day of month decreases by 1 in between the A and C printlns.

Thanks again.

[ April 23, 2008: Message edited by: Bridget Kennedy ]
[ April 23, 2008: Message edited by: Bridget Kennedy ]
15 years ago
Thanks for the reply, Piyush.

I still don't understand why the set HOUR has no effect.

It seems I have a fundamental misundertanding about how the Calendar class works.
15 years ago
Another interesting observation, R Lopes, though I can't think of a good reason for the behavior.

It seems there is a lot going on 'behind the scenes'. Mysteries are never a good thing in software development.

Thanks for your interest.
15 years ago
I am puzzled by some GregorianCalendar behavior. The code in question:

If I run this program as is, I get the following output:


If I comment out the B and D System.out.println statements, the output is:

My questions are:

1. Why, in the first case, does setting HOUR_OF_DAY have no effect?
2. Why, in the second case, does DAY_OF_MONTH decrement by 1?
3. Why are the C, E outputs different in the two cases?

Thanks for your consideration.
[ April 17, 2008: Message edited by: Bridget Kennedy ]
15 years ago
A quick check of the ArrayList API provides this description of the addAll return value:

Returns:
true if this list changed as a result of the call

You get false for a zero-length add because there is no change to the original.
15 years ago
Typewriters.

My daughter spent the day helping out in her grandma's law office several years ago. She came home all excited about this machine she got to use, and went on to describe an IBM Selectric. She was particularly attracted to the sound it made. It was pretty interesting to hear the description from someone who had no prior context. The word 'typewriter' was not in her vocabulary.
16 years ago
I once had a Java instructor tell my class that "derived classes only inherit public and protected methods and data members from their base class". This is simply not true. What is true is that the derived class only has direct visibility to the base class public and protected methods and data members.

As EF-H suggests, a derived class inherits everything from its parent - and from all other classes in its inheritance hierarchy.
[ December 13, 2007: Message edited by: Bridget Kennedy ]
16 years ago
Re. my comment:

I was faked out by the scrambled variable names in getGrandTotal, when, in fact, the order is irrelevant.



The reason the order doesn't matter in this method:

is that all the arguments are of the same type and the operation performed in the method (adding them all together) just happens to be order independent.

Of course, even though it will work regardless of order, you should always follow your specified ordering when calling this method for the purposes of making your code more readable. Doing so will also prevent future errors - say in the case where you modify the method and introduce operations for which the ordering IS important.
[ December 11, 2007: Message edited by: Bridget Kennedy ]
16 years ago
Ah yes. I was faked out by the scrambled variable names in getGrandTotal, when, in fact, the order is irrelevant.

This Josh is a tricky fellow.
16 years ago