Ralf Butler

Greenhorn
+ Follow
since Jan 22, 2010
Merit badge: grant badges
For More
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 Ralf Butler

Hi there,

I use a FujiXerox printer which works very well with cups.
I recently use cups4j (great lib but wondering whether it is still actively maintained?!) to print PDFs.

What I haven't found out so far is how to determine whether the printer is out of paper. And I am not sure if it is possible to find out. In case of the FX the printer claims to be out of paper but the job is marked as complete on cups end. As well I would l ike to find out whether something like a paper jam occured.

I would very much appreciate if someone could help me out on that.
Ralf
Thanks for the quick reply Ulf!
I am asking because I am wondring how to deal with confidential information stored within a String. Most people propose to use chars and clear them after usage. But this doesn't help if I am working with a function of a proprietary library that allows Strings as parameters only. So I am simply interested in how to ensured that all String values are gone.

Interesting that once the JVM terminates the Strings remain in memory. Ok, that brings everything down to the OS level. So I would need to find out how to wipe RAM areas previously used by the JVM under Linux.

Thanks so far!
Ralf
9 years ago
Hi,

Since Strings are immutable and a predictions on how many copies of a Java String are lurking around within RAM I was wondering what could ensure that all Strings of a Java program are finally removed from RAM.
Is there a command that could wipe all Strings? Google doesn't say so.
Does the termination of a Java program ensure that all Strings are removed from RAM?
Or is a a computer restart necessary to make ensure that all Strings are removed from RAM?

Thanks
Ralf
9 years ago
Hi Rob,

Very interesting blog entries. So I understand that I can capture keyboard events by using AWTEventListener. But what I still don't get is how to capture a particular keystroke, like the "Left" keystroke for example. In addition the "Left" keystroke should not be forwarded to the Jtree component. Do you have a little example for that?

Thank you,
Ralf
13 years ago
Hi there,

I want to make my application responding to keystrokes. But it seems that some keystrokes are swallowed by other components. I use a top level component to capture all keystrokes:

This approach works fine for many keystrokes like CTRL+SHIFT+A or CTRL+SHIFT+B. However, I now want to capture CTRL+SHIFT+RIGHT. Can it be that it is swallowed by a jTree which has the focus? It is for sure not captured by the OS because the KeyListener example (http://java.sun.com/docs/books/tutorial/uiswing/events/keylistener.html) works fine and captures exactly this keystroke.

Help is much appreciated,
Ralf
13 years ago
Na, unfortunately not. I'll go for your first idea.

Thanks,
Ralf
13 years ago
Hi Ulf,

Yes, I thought about an extra class which somehow takes over the task of notifying components when necessary. I guess that is what you mean.

"But since I would need to use non-static elements that should fail": Well, I would need to fire a property change out of that static method:

But that would mean that propertyChangeSupport would need to be declared as static within the class. In consequence the PropertyChangeSupport constructor causes a problem since it requires an object:


But maybe I can use something else than PropertyChangeSupport? Curious to know ;)

Thanks,
Ralf
13 years ago
Hi there,

I have a couple of static methods that I use. One of those adds a record into the database. Now, several components are affected by that additional recordset and need to update their GUI. What is the right approach here?

Initially I thought to just fire an event out of that static method which would be caught by all listening components . But since I would need to use non-static elements that should fail. So the question is, how do you professional programmers approach that issue?

Thanks,
Ralf
13 years ago
Hi there,

How do I extend a JPA entity in regard to its NamedQueries. Following doesn't work:


I then invoke the whole thing via:


I receive the error message that singleResult is empty.

Help is much appreciated.
Thanks