Cy Bird

Greenhorn
+ Follow
since Feb 18, 2003
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 Cy Bird

I'm looking to change jobs. Does anyone know any good salary survey websites that I can use in my research and for negotiation?

Thanks in advance.
16 years ago
Yes, thank you. I found my way there...
For anyone else with this problem, I ended up with something like this:
getTableCellRendererComponent() {
SimpleDateFormat dateFormat_mmddyy = new SimpleDateFormat("MM-dd-yyyy");
String formatted = dateFormat_mmddyy.format((Date)value);
return new JLabel(formatted);
}
18 years ago
I have a column in a JTable that holds a date value in mm/dd/yyyy format. The actual value in the database is a java.util.Date, but we convert it to a string using a SimpleDateFormat to get it into the mm/dd/yyyy format.
In string form though, it doesn't sort correctly: 11/10/2003 comes before 11/11/2002. When I leave it a date, it sorts correctly, but displays in the wrong format: MMM dd, yyyy.
Does anyone know a way around this?
Thanks.
18 years ago
I guess that is my question. Is there an example of how to listen for resize events? I tried WindowAdapter and didn't find I want I neeeded there.
19 years ago
I want to resize a component on a JDialog at the same time the user is resizing the JDialog itself to match dimensions?
Is this possible? (Without using GridBagLayout)
19 years ago
Thanks for the replies... I ended up extending JComboBox. My new comobbox now holds a map of all my elements. The ID is the key, and the value is my my custom bean. Very similar to the hard objects, just a little lighter and more cusomizable. The only reason we're going this way (we're using DynaBeans btw) is for memory purposes. Our app has to run on really slow machines and we have a lot of gui-rich features. Just trying to eliminate some weight...
19 years ago
Rather than solid dataobjects, I've got a generic class that is used to by all of my data... rather than explicit getters and setters there is a getPropery("field") method that returns me what I want.
Problem is on a JComboBox. I was using toString() when I was populating with solid objects. Now, toString() could mean anything.
Is there a way to overide either the comboBox or the model to tell it to display what I want? To make it configureable?
Thanks.
19 years ago
I had this exact same problem. We actually put an app into production that minimizes then maximized the JFrame (to mimic alt-tab) which gets around the problem. Our solution: switch to JDialog. We've had much success since.
19 years ago
- It is fairly expensive (4 JTables and a bunch of JCheckboxes). It is called very often.
- I found out what method is causing things to not release (when I comment out it's released after 2 gc). Now just need to figure out why. We're doing some static calls, so I think that might be a player.
Thanks for the help.
19 years ago
...build something in java...
...low memory requirements...
Sorry, but I think you might have to lower your expectations. Anything with GUI and java in the same sentence that I've seen, is either buggy or incredibly slow.
19 years ago
I had similar type of problem. What fixed my problem was to do a setFocusable(false) for every other component that might of been messing with me.
(If you think this might be the problem, don't forget about scrollbars!)
19 years ago
The only reason I was looking into reusing the parent was for performance reasons. However, it seems to be a domino effect... the parent isn't releasing the child, and the child isn't releasing the grandchildren. How can I troubleshoot what might be holding a reference? Any pointers?
Thanks.
19 years ago
I'm assuming you've tried requestFocus() or grabFocus()...
19 years ago
I have one JDialog that creates a new local variable of type JDialog. I do a .show() on the child to show it and do a setVisible(false) on the parent to hide it.
Inside the child on an action performed I do a dispose(). But the finalize is not actually executed until the parent is finalized. This is a problem because I want to cache the first dialog and re-use if for the life of the app.
Ideas?
19 years ago
setPreferredSize() didn't actually fix my problem. I did find a workaround though... I'm reusing the JDialog in question. On the close of the window, I call dispose(). It fixes my problem (my combo is now 'clickable') and it never actually releases the form back to memory. I verified this with JProfiler. Strange side effect!
19 years ago