Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!

Sam Ritter

Ranch Hand
+ Follow
since Jan 23, 2018
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 Sam Ritter

Thanks, that worked. Now I need to understand why it used to work before those changes. It seems to me, based on what you added, it could never have worked.
3 weeks ago
Thanks for the reply but I'm not sure what you are asking. All the references to those classes get not found errors during the compile step.
3 weeks ago
This is driving me crazy. I had a huge problem getting my make.xml to include my external libraries for the build process. However, I eventually got it working with some help on this forum. After accomplishing what I needed didn't need to use it for several months. Now I need to use it again and once again it is broken for no apparent reason. Here is the make.xml used for that build that finally worked, until now:

I have no clue why it no longer includes those jar files or how to debug it. There are no error messages from the build about the zipfilesets and the jar files are definitely in the specified path. I need someone to help me figure out why this stopped working. TIA.
4 weeks ago
I'm not sure what you are saying. Then in theory my implementation should work?
1 month ago
Thanks for the replies. I tried keys bindings but it didn't work. From my research the binding only works if the window is active. Since it seems I cannot bind a key to a JDialog, I had to bind it to the parent. Since the parent is not active, the JDialog is, the key press is not seen. Here is how I had to implement the binding ('dialog' is my JDialog component):

The println never happens.
1 month ago
My JDialog starts an audio clip when it opens. I want to use the space bar to close that clip.
1 month ago
I have a JDialog with a bunch of buttons to take various actions. However, I want to add one thing and that is to detect when the space bar is pressed. I have read about key bindings and keylisteners but it is not clear which is the correct/best one to use. Which should I use to detect ONLY a space bar press to keep is simple? TIA.
1 month ago
I have been struggling with a Pexpect script. I am 'expect'ing a couple of strings or a timeout. When the strings are found, that works fine. However, when I get a timeout I want to get the output at that point, if any, but cannot find a way to do it. It seems like 'before', 'after' and 'readline' do not work in an 'except proc.TIMEOUT' block. Actually I cannot get 'readline' to work at all. How do I determine if there was any output and if so get it? TIA.
2 months ago
That is the information I was looking for. Although a bit counter intuitive, I guess that is why using setters/getters is considered good programming practice. Thanks.
2 months ago
Example of direct variable access.

2 months ago
Given a singleton class (only one instance ever) is it more efficient to access a variable directly rather than using setter/getters? Or is the difference sufficiently insignificant that getters/setters are still better programming practice? TIA.
2 months ago
No zoom. What they see is what they get.
2 months ago
Thanks. I guess it comes down to the definition of "ideal,"  as opposed to personal preference. I would characterize it as the largest possible without clipping. I'll have to look at the toolkit class as I am not familiar with that.
2 months ago
I have a JPanel that is added to a JFrame set to maximum screen size (there is no resizing). However, as I try different devices with different screen sizes (smaller ones in particular) the fonts start getting cut off in the JPanel. Given that I know the size of the JPanel and number of lines, what is the best way to calculate the ideal font size and vertical spacing, assuming standard fonts? In my case, if it matters, I'm using Times New Roman. TIA.
2 months ago
Thanks. I'll see if those help.
2 months ago