Bill Johnston

Ranch Hand
+ Follow
since Nov 17, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
8
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 Bill Johnston

Over the years I have heard good things and some bad things about both. I think you'll find that's true about food, cars, washing machines, boats, shoes, skis, etc, etc. Both of these have had a lot of effort and work put into them. This is ultimately an opinion question - here's one link that is "only" 2 years old and I think kind of mirrors what I said:

http://stackoverflow.com/questions/7358775/java-gui-frameworks-what-to-choose-swing-swt-awt-swingx-jgoodies-javafx

It has been my experience that applications I see offered in the real world are almost exclusively swing or swing based. This is also my preference.
6 years ago
I didn't mean to pan Groovy. I've been reading, studying and practicing it for a while now. A lot goes in and come back out though since officially we're not coding in it here yet, but probably will be soon. Thanks for the link though. And yes, if you code Groovy well, it can be clean and clear. The problem is that Groovy makes it a lot easier to make a hash of a program than does Java. It will require careful attention to non code induced coding standards to prevent that from happening.
6 years ago
It is the 'I agree' part ... like I'm coming in the middle of a conversation I didn't start. Odd way to advertise if you ask me.
6 years ago
No that message is not browser or topic specific.

As to Java. Yes perhaps some folks felt or feel that Java did not deliver all that it was supposed to. What language does deliver all that some folks expect. Some folks are not happy no matter what you give them. To me Java is the greatest thing - so far as computer languages go - since sliced bread. I like some aspects in Groovy too, but as I said before, I think that Groovy also takes one, two or more steps backward in the guise of going forward, by practically eliminating strong typing, removing the need for the semi-colon (which makes Java code much clearer - oddly Groovy folks seem to think this makes Groovy code easier to read ... go figure), and generally allowing the 'shoot yourself in the foot' a lot easier. My opinion - not expected to be shared by others. In my opinion, the bad things about Java are mostly caused by the recent attempts to add in a lot of junk to the language to make it more hip (to my mind like painting my hammer candy apple red and giving it 3 moving parts) and hackers attempts to exploit it. In fact a lot of what is bad with any language or operating system is caused by hackers attempt so exploit them.
6 years ago

draco doc wrote:This reply may be late but I'd like to suggest you look at Miglayout. It's very powerful and easy to use once you learned about the language.
I used to searched and tried lots of things for SwingBuilder because this is not a hot topic and there were not many detailed information available. I wrote my findings and experience about SwingBuilder and Miglayout in 3 articles. Here are the links in case you want to have a look.
https://sites.google.com/site/dracodoc/groovy/swingbuildermiglayout



Thank you very much! I appreciate your answer. The more I look around - such as on groovy.codehaus.org (which is a nice site and source of information) - the more it seems to me, coming from a very polished and professional environment in Java, that Groovy is kind of, well, not so terribly professional. It seems like one step beneath beta.

BTW, what is this "I agree. Here's the link: http://aspose.com/file-tools" comment below. I know it's an addvert, but what's with this "I agree"?
6 years ago
Thank you Andres,

Thank you for answering. In the interim I have gotten it to work. The FlowLayout was not the problem, as Borderlayout is the default LayoutManager for a JFrame's ContentPane. Rather, it seems that the original way I did it was to place the BorderLayout constraint inside each Panel. I amended the code this way:



I see that the way you did it is similar but different. Part of what I find difficult in Groovy is that there seem to be too many ways to do the same thing, and to understand someone else's code you need to know all the different ways.

BTW, what did you mean by "I agree"? ... or was that someone else's unmarked statement?


6 years ago
Hello,

I am a Java developer and have done a fair share of GUI application building in Java. I am new to Groovy, and, quite frankly, I am confused over a few points. Firstly a gentle rant - but there is a point to it because it involves my first question ... while Java has - in my opinion mistakenly, taken on the overly complex generics tack on in the effort to catch every possible error it can in the compile step, Groovy seems to have gone in the entirely opposite direction and made it not only possible, but extremely likely that a clean compile will not run. Why do I say this? Because I am trying to build a very simple GUI using SwingBuilder in the Groovy/Grails Tools Suite, and I constantly get clean compiles that fail on execution.

So my first question is ... how can this be that I am getting the clean compile and then the errors at runtime are so basic; like: "No class found CENTER"?

My next question is that I have the following code. And of all the constrains for Component placement, only the JButton.CENTER is honored. All the others are simply ignored. The top 'apanel' won't display unless I comment out all the code for bpanel. I've tried various other derivations for placement of Components and none work - some compile and error at runtime and some don't error at all - like these - but are not honored. Here is the code. Thank you very much in advance for any help. Also, for those that do GUI work in Groovy, do you use SwingBuilder, or do you code as you would in Java?


7 years ago
Maybe they don't call default method access that anymore, but back in the day they did.
8 years ago
For the reason why Java was designed that way, you might be better off doing some searches on that, unless someone here happens to know the answer already.

But as to what you stated about accessing friendly and public methods in the same package in the same way, then yes, you can. But of course it matters outside the package and that is the point, isn't it?
8 years ago

Martin Vajsar wrote:

Bill Johnston wrote:To do this add the batch file to your jarfile. Then create a Process that runs the batchfile.


Is it actually possible? Batch file is interpreted by cmd.exe in Windows, and I didn't succeed trying to force cmd.exe run a bat file inside a zip.

(As Adrian mentioned, this still would not be a good idea in this case, I just got interested into running batch files from jars in general. Also, I assume "Windows" when I see "batch file", as other OSes usually call them "scripts".)



Worked when I tried it.
8 years ago

Campbell Ritchie wrote:Processes are too difficult for “beginning”, so I shall move this discussion.



That's fine by me; however, I have seen that there seems little differentiation between General and Beginning; in fact I've often times read more difficult questions on the Beginner forum than on the General one ... even thought I know it ought not to be that way. ;)
8 years ago
If I understand you correctly, you want to run a jarfile that in turn kicks off a batch file that does something.

To do this add the batch file to your jarfile. Then create a Process that runs the batchfile.
8 years ago

Campbell Ritchie wrote:

Bill Johnston wrote: . . . My guess is that the OP wants to know if he could knock out certain members from being serialized by using transient, regardless of whether the data is sensitive.

Yes, you can exclude fields from serialisation with the transient keyword. But why would you want to/

And thank you for the citation.



Reasonable question Campbell. That's for the OP to answer, as I was only posing it as a possible reason the OP might want to use the keyword.
8 years ago
My guess is the the player doesn't really stop.
8 years ago