This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line!
See this thread for details.

jefff willis

Ranch Hand
+ Follow
since Sep 29, 2004
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jefff willis

I'm not sure what you're doing but it's not all that difficult.

Maybe you are getting mouse Up and mouse Down events of some sort.

Here is a quick and dirty example:

18 years ago
18 years ago
cut and paste this code to see an example that runs:

18 years ago
It's not a complicated problem. Every one who has studied Computer Science in college has had to solve this problem.

Here is a link that may provide you with more information.
18 years ago
Well, how would you do it in a language other than JAVA?
18 years ago
This is just a quick evaluation of your code, but I believe I see yout create fours columns of data headers and you try to fill it with five columns of data.

(there are two Boolean elements at the beginning of your data Vector)
18 years ago
Not that I know of.

It's less of a PITA if you use a IDE that has some sort of graphical design module.

I use JBuilder and it seems to easy enough to get along with.
18 years ago
This sounds to me like a basic undergraduate level computer science assignment.

If it is, then you will probably have a lab class that goes along with the lecture portion.

In the lab class the instructor (probably a grad student) will give you algorithms and insight on how to design your application. He will probably be your best source of information. We will be a good source of information when you get stuck in some of the coding.
18 years ago
The String class represents character strings. All string literals in Java programs, such as "prasad", are implemented as instances of this class.

Strings are constant; their values cannot be changed after they are created. String buffers support mutable strings. Because String objects are immutable they can be shared. For example:

String str = "prasad";

This creats a string literal, sets it's contents to "prasad" and pases the reference to that literal back to your variable [str].

This however:

String str = new str("prasad");

creates a string literal and sets contents to "prasad" (just like above). But a new string is created and the reference to that literal is passed to it. THEN that new string's referenc is passed to your variable [str].

Since TWO string literals are created in the second example, use the first one in your programs.
18 years ago
Did you create the table and it's data?

Did you put an [integer] 8 in that column or a [String] "8"?
18 years ago
I think your problem is actually with your LayoutManager.

You can set a panels layout manager to null.

Do that, and then set the size of your panel to whatever you like. Just remember that any components you place on that panel will now have to have their locations specified also.
18 years ago
invoke the toString() method of your array elements:

Just copy and past the code .
18 years ago
Two ideas come to mind...

1. actually disable the table (and scrollpane if you have one)

2. enable mouse events but do nothing with them

18 years ago
Change your MouseClicked method to include columnAtPoint, not getSelectedRow.

Here is a code fragment...

18 years ago
Has anyone ever programitcally changed their horizontal scrollbar?

I'm using a JTable in a scrollPane and I need to take three simple steps:

1. get the current position of the horizontal scroll bar
2. recreate the table with new data (not a problem)
3. reposition the scrollbar on the new table to the same position as the old table

Can anyone give me an idea how to get the horizontal scrollbar position?

I tried this approach but haven't had much luck:

18 years ago