Steven Hatfield

Greenhorn
+ Follow
since Jan 25, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Steven Hatfield

I was able to track down one of the original developers, and it turns out that the conversion process was created to reduce the size of the memory footprint of the application.
13 years ago
I was able to track down one of the original developers, and it turns out that the conversion process was created to reduce the size of the memory footprint of the application.
13 years ago
Hello! This question is for the long timers of Java. I am a newbie to Java (but an old hat programmer), and have a weird issue that I need some help with.

I am working with a Java program that was developed from 1999 to 2007, and then purchased by the company that I work for. The team that I am working with is responsible for creating the next version of this program, which contains several enhancements and fixes to existing code.

In the program, images are displayed over the top of other images at several places in the UI, so it is a 'foreground' and 'background' image setup. The thing that is weird is that there is a process of converting the 'foreground' images into a different image format, removing transparent pixels from the top and left of the image, leaving only pixels that can be seen. The conversion process outputs a csv file that contains the original location of the non transparent pixels, so that the image can be displayed in the proper location. This is a pretty intensive process, given that it does this to over 5,000 images!

The problem is that while it works fine on Windows XP, it is broken on Windows 7. The images that are converted on Win7 come out odd looking, with colors that don't match the original images, etc.

The good thing is that my teammates and I have created an editor that allows us to create composite images using transparency and have had no problems at all. Given this info, we're ready to eliminate this conversion process with standard PNG files, and rewrite the portions of the program that use the converted images. In order to do this, I need to be able to speak to management with authority about why this conversion process exists at all...

So the question I have is -- did "Java of old" have problems displaying images with transparency over the top of other images?

Thanks in advance for any help.
-Steven
13 years ago

Kevin Workman wrote:Or you could use a Glass Pane to detect the background MouseEvents instead.

Tutorial: How to Use Root Panes
Another article that's extremely helpful: A well-behaved GlassPane



This required a bit of work, and some luck, but I was able to get the GlassPane to work.

I used the sample GlassPane class from here: http://www.javafaq.nu/java-example-code-472.html
and changed it to accept the label that will be updated in my sample program. Now I get positioning within the blue box, the background, and overall positioning with the GlassPane. Fantastic!

Thank you!
13 years ago
Hi all!

I need some help with getting 2 MouseListeners working at the same time on 2 different overlapping JPanels.
I have created a sample class that shows what is happening. Perhaps this is "the way that it is", but I need a way around the problem.

I have a background panel and a foreground panel. I need to track the mouse position in the background panel, even when it is over the foreground panel. The problem is that when the mouse is over the foreground panel, the background panel stops "listening".

Is there a way to keep both of the mouse listeners listening?

Thanks,
Steven

13 years ago
Hello! This question might be for the long timers of Java. I am a newbie to Java (but an old hat programmer), and have a weird issue that I need some help with.

I am working with a Java program that was developed from 1999 to 2007, and then purchased by the company that I work for. The team that I am working with is responsible for creating the next version of this program, which contains several enhancements and fixes to existing code.

In the program, images are displayed over the top of other images at several places in the UI, so you have a 'foreground' and 'background' image setup. The thing that is weird is that there is a process of converting the 'foreground' images into a different image format, and the conversion process deals with looking for transparent pixels starting at x and y = 0, searching for non transparent pixels, creating a csv file that contains what it calls the "actual X" and "actual Y" of the image, and then generating a new image that doesn't contain the transparent pixels, basically moving the non transparent part of the image to the top/left. This is a pretty intensive process, given that it does this to over 5,000 images! The problem is that while it works fine on Windows XP, it is broken on Windows 7. The images that are converted come out odd looking, with colors that don't match the original images, etc.

The good thing is that my teammates and I have created an editor that allows us to create composite images using transparency and have had no problems at all. Given this info, we're ready to eliminate this conversion process with standard PNG files, and rewrite the portions of the program that use the converted images. In order to do this, I need to be able to speak to management with authority about why this conversion process exists at all...

So the question I have is -- did "Java of old" have problems displaying images with transparency over the top of other images? Is this why the conversion process was developed in the first place?

Thanks in advance for any help.
-Steven
13 years ago