Kaydell Leavitt

Ranch Hand
+ Follow
since Nov 18, 2006
Kaydell likes ...
Eclipse IDE Firefox Browser Mac OS X
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
9
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 Kaydell Leavitt

"how to open a terminal window in MAC".



If Terminal.app 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.
8 months 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)

code-coach.net (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.
8 months ago
Hi,

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
2 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: kaydell@yahoo.com?

Thank You.

-- Kaydell
4 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.
4 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.
4 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?
4 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?
4 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.
4 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.
4 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.
5 years ago
Thank you both for your replies.

I'm looking into JavaFX now.
5 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:
http://docs.oracle.com/javase/7/docs/api/javax/swing/text/html/HTMLEditorKit.html

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?
5 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.
5 years ago