Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Stefan Krompass

Ranch Hand
+ Follow
since Apr 29, 2004
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 Stefan Krompass

Hi,

how can I measure the execution time of a query in the database (DB2)? Something like
won't work (IMHO) since network time is included.

Stefan
Hi,

I think, you speak on a beta-release when all (more or less) items of your software are included but not finally tested. Some functions of your software might still crash.

Stefan
17 years ago
Hi,

you could use a list where you store the keys of your hashmap in the order you inserted them in the map.

Stefan
17 years ago
Hi,

Just read this. And there, we find can find the following sentence:

The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls.



Stefan
17 years ago
Hi,

you should have posted to Swing/AWT/SWT/JFace, but nevertheless: You have to implement your own TableModel. See the Java Tutorial for further explanations.

Stefan
17 years ago
Hi,

there is no such method in the API since it would only work for a subset of all properties. Imagine the following case:

When your values become keys, they are no longer unique.

Stefan
17 years ago
Hi,

you can pass arguments to threads via constructor. Just implement a class that implements interface Runnable (or extends class Thread) and pass whatever you like:



Stefan
Hi,

why do you want to create an object of the superclass? I don't see why this is necessary...
If we knew more about what you want to achieve, we could try to find another solution.

Stefan
17 years ago
Hi,

look at the Calendar-class. Method add might be what you look for...

HTH

Stefan
17 years ago
Hi,

if this is really a bug, you could try newer Java-versions (the most up-to-date version of 1.4.2 AFAIK is 1.4.2_06). You might as well search the bug database for any hints.

Stefan
17 years ago
Hi,

the class JFileChooser provides a method getSelectedFile() which return a File-object. You can read the content of this file (BufferedReader and FileReader) into a StringBuffer and set the content of the textfield to the content of the StringBuffer.

Stefan
17 years ago
Hi,

the simplest idea is to use a second Map which stores the elements of the String-arrays as keys (assuming a String cannot appear twice) and the Integers as values.

Stefan
[ December 09, 2004: Message edited by: Stefan Krompass ]
17 years ago
Hi,

what is your *exact* problem? Compiling problems? Or do you expect your program to behave differently? What does your program and what should it do?

Stefan
17 years ago
Hi,

remove c:\j2sdk1.3.1_02\bin from your PATH and add c:\j2sdk1.4.2_06\bin instead.

Stefan
17 years ago
Hi,

you will have to implement your own table model and overwrite the method boolean isCellEditable(int, int). Your version of isCellEditable simply returns false. This might look like this:


Stefan
17 years ago