Norm Miller

Ranch Hand
+ Follow
since May 21, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Norm Miller

Just one correction to previous responder: Jython IS being worked on again. Brian Zimmer has received a grant to finance a major upgrade this year. You can Google search "Jython sf" to find the latest info.
19 years ago
Hi,

The Color class has a static method "decode" that takes a string and returns a Color.

Something like:
19 years ago

Needless to say at least 70% of the company just walked off and refused to participate.



Adrian --

Prediction: The other 30% will be collectively known as "Managers" soon.
19 years ago
This is a problem which really solves best with a recursive solution. If you already have that, why change it? If you must change it, you can make a recursive solution into an iterative one. I googled for a couple minutes using the keywords "recursion" and "iteration" and found several sites showing how it is done.
19 years ago
Here's a reference which will help you do this: How To Make Dialogs tutorial
This has an example doing exactly what you want.
20 years ago
I understand what you are saying. Gridbag will certainly keep the X-Y relations right, but it is tough to get it nailed down that last little bit -- as you have found out.
20 years ago
Hi,

I may be dead wrong, but when I am planning a layout where I have a requirement to line everything up "just so", I don't think of gridbag layout.

I have had good luck with grid layout in cases like this because it likes to set the grid sizes to the largest component you are using to build it. If you have java 1.4, you can also consider the "Springs" layout. There is an article on it [URL=http://java.sun.com/docs/books/tutorial/uiswing/layout/spring.htmlhere.[/URL]
[ June 22, 2004: Message edited by: Norm Miller ]
20 years ago
I know it isn't very popular to mention it at the ranch, but Netbeans is really pretty good at helping you do Swing. I tend to keep my frames and dialogs fairly simple and in those cases the code generated is more than "good enough". You really do have the drag-and-drop capability of Visual Basic.

One of the plusses is a nice graphical editor for GridBag layout which, for me, makes that layout actually usable. It supports all the layouts I ever needed (up through Java 1.3).

I follow the discussions on the newsgroup for Netbeans and there isn't a lot of complaining about the Swing support. (J2EE and the related technologies certainly have more issues.) The only minus I can think of concerning Swing is they haven't yet included support for the "Springs" layout of Java 1.4.

Now, on the other hand, I have a very involved main form with a complex menu structure. For that one I chose to use a mediator and a command pattern to separate the menu display from the rest of the program code as recommended in Fowler's book. Netbeans didn't interfere with me as I did that, but it certainly didn't help with the process either.

Also, like Java, it is free. I think the learning curve was reasonable. Recommendation -- take a look at it.
20 years ago
Well, for one there's Rational Rose but it is definitely NOT freeware.
Check the title page of this site. Look for Granny. She can help.

20 years ago
Pursuing this answer a bit further:

Is there any good to be gained by taking advantage of the various layers that the Swing model makes available? I.e., draw the image as shown, but put the ball on the Transparent layer.

If you want to mouse click on the ball, does the answer remain the same?

Thanks
20 years ago
Here's a little bit of code that should show you the way.




It prints "delta".


Regards.
20 years ago
Do a search for "GregorianCalendar" or just "Calendar" and you'll find what you need.
20 years ago