This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!

Kaydell Leavitt

Ranch Hand
+ Follow
since Nov 18, 2006
Kaydell likes ...
Eclipse IDE Firefox Browser Mac OS X
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kaydell Leavitt

"how to open a terminal window in MAC".

If is missing, you could reinstall macOS, on top of your current installation.  I mean even though you have macOS installed install it again over top of what you already have installed, without deleting or erasing anything.  This should replace what comes with your version of macOS which is deleted.
1 year ago
I don't know if Java has such a feature but your question reminds me of the Two Generals Problem in computer science.  Wikipedia article on the two general's problem

I have heard of a Professor Leemon Baird who says that he has proven that his software -- which is written in the Java language -- has solved the two generals problem using a data structure and related algorithms that he has recently discovered.  

Hashgraph (the technology)
Swirlds (the company) (my site)
I prefer reading a book and trying things out, then getting help on a forum or if needing more interactive help, asking an expert to do screen-sharing with me.
1 year ago

I'm developing a cross-platform, Java Swing application, using my Mac, using macOS El Capitan (10.11.6) and Java 8.

I want to write handlers such as a quithandler, preferenceshandler, and an abouthandler.

I want the app to be as Mac-like as possible, yet also work on Windows and Linux, all using the same .jar file.

I understand that back in Java 6, and earlier, that Apple's version of Java 6 allowed this sort on thing?

How can I do this without downgrading to Java 6?

-- Kaydell
3 years ago
A couple of months ago, Apple announced a new programming language called "Swift" that is safe, modern, and powerful, according to Apple.

Is there anybody out there who is interested in porting your Java code to either OS X or to iOS using the Swift language?

If you are, then would you take a look at the beginning of my tutorial called: "Swift for Java Programmers". So far, I have the first part of it done which tells you how to gather and setup the equipment and software necessary to begin learning to develop software for Apple devices, using the new Swift Programming Language:

Getting Started With Swift

If you have any ideas for me, will you send me an email at:

Thank You.

-- Kaydell
5 years ago

an IDE is not an option I need to learn to use layout managers

As @Campbell has suggested, you could use Cay Hortsman's class called GBC. You can find it if you google for "cay hortsman's GBC class". It's not an IDE, it's a subclass of GridBagContraint. It looks like a way to better understand the GridBagConstraint.
5 years ago
Sorry, @Campbell, I figured that you would know about the Gnu Public License since you're a sherriff and have been a member for so long and since you have answered so many questions, but I just wanted @Jason to know that "open-source" doesn't mean "public domain". Maybe he didn't know that.
5 years ago

Find out about Cay Horstmann's GBC class

OK. I didn't know that, but doesn't this GBC class having a Gnu Public License mean that if you use it in your code, then your code is also open source code under the Gnu Public License?
5 years ago

the layout is not as it should be, see screenshot

Can you use a GUI editor or do you have to use layout managers?
5 years ago
1. Instead of only doing a static import as follows:

import static java.awt.GridBagConstraints.*;

You'll need to do a full import as follows:

import java.awt.GridBagConstraints;

2. You'll also need to import the Insets class as follows:

import java.awt.Insets;

3. Also, for each GridBagConstraint, when you call the constructor, you'll need to pass in two more parameters as follows:

selectionPanel.add( textArea1, new GridBagConstraints( 0, 2, 1, 3, 0, 0, CENTER, NONE, new Insets( 0, 0, 0, 0 ), 0, 0 ) );//set constraints on the element and add to jpanel

I believe that by making the above changes, you'll be able to compile.

4. Play around with the numbers to get things positioned on the screen.

I think that these 4 steps will get your project working.
5 years ago
I agree with @Martin Vajsar in that you need to import the two classes: GridBagConstraints and Insets.

I can add that in your calls to the GridConstraints constructor that they need to have two more ints on the end.

I have read that the GridBagLayout and the GridBagConstraints together are powerful, but it seems to me that the NetBeans GUI editor has some advantages that I would like to try out.

Just today I found a bug in my code for one window that was using the altogether too complicated GridBagLayout. I replaced the code with the usage of a BorderLayout and a GridLayout which worked better in my case. Your case is different though, but it just makes me wonder what the GridBagLayout is good for.
5 years ago

Rob Spoor wrote:

m Korbel wrote:- very funny, interesting is that depreciated (long timed from Java1.3/4) methods still arent't removed

Nor will they be removed. Sun never removed any deprecated methods / classes because it could break old code. Oracle have adopted that way of thinking.

As much as I hate to see cluttered code and documentation that is caused by leaving deprecated methods in the API, I believe that it's probably for the best.

I mentor computer science students using Python, and there are so many incompatibilities between Python 2 and Python 3 it's ridiculous. Python 3 is supposed to be an improvement (which it is) but it just causes so much confusion because the developers of Python made so many incompatibilities between Python 2 and Python3.
6 years ago
Thank you both for your replies.

I'm looking into JavaFX now.
6 years ago
I recently upgraded to Java 7 and I thought that I'd take a look at the JavaDoc for the HTMLEditorKit to see what version of HTML is supported using Java 7.

The Java 6 API only supported HTML version 3.2 which I though sounded very backward. Now, I've just read that the Java 7 API now supports HTML version 3.2 still and is "working on migrating to HTML 4.0".

Java 7 JavaDoc for the HTMLEditorKit:

Is Oracle kidding me? What is going on? It seems like the work is starting to standardize on HTML5. So, we have support for 3.2?
6 years ago

Rob Spoor wrote:Do you happen to have a class named "Color" in the same package? Perhaps a left-over from somewhere?

Yes, I'm putting too many exercises in the default package. I know better myself, but I fancy myself a Java tutor and my students don't know about packages yet so everything ends up in the default package.

Thank you for your help.
6 years ago