Lucas Richardson

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

Recent posts by Lucas Richardson

Pressing enter and having the focus move to another field isn't all that uncommon. An example is a program requiring a login, where you put in your user name, hit enter, and it automatically moves the the password field.
22 years ago
He can't compile it if he's using dos 6.x or earlier though. Javac only takes a file with an extension of .java, correct? Even .jav doesn't work..
23 years ago
Browsers need the java plug-in in order to use Swing. You can find it at sun's website.
23 years ago
Does it work in a browser? Does any other applet work in the appletviewer? It might just be the appletviewer itself...
23 years ago
They will need the plug-in to use Swing in a browser, as the browsers only support java 1.1.something that does not support swing.
There are many benefits. First of all, there aren't peer components in swing. For every AWT component, there is a native peer component in the OS. This slows things down, and is restrictive. Because of this, there is also the pluggable look and feel, which allows you to change how everything looks. You can make your whole program look like windows, unix, or java's own "metal" look, and it will look that way on all platforms. You can also create your own. Swing also has more components than AWT does, and most things are more customizable.
You can find some more information here: http://java.sun.com/products/jfc/
23 years ago
The quickest and easiest thing to do would be to use tabs (put a /t in the string where you want one), as long as you don't mind the somewhat large gaps it may leave.
Otherwise, depending on how your code is, and assuming that the $ amount is the only thing that will change in length (besides the last collumn), you could make that a String before displaying it, get it's length, and then pad spaces based on that.
23 years ago
Asher has it right, though you'll want to create an instance of account (or else you can only ever have one account, everything in the class Account that you're accessing would have to be static). Anything that isn't declared static requires an instance of the class to be created before you can access it because each instance gets it's own copy.
You might also want to use different names for some things. For instance:
double getFunds
sounds like a method, but it isn't.
23 years ago
There are various methods that allow you to play with the size. you can find the java API here: http://java.sun.com/j2se/1.3/docs/api/index.html.
The lower window on the left side lists every class in J2SE. Scroll down to stacks and it will show you all of it's methods and, more importantly (for what you want), those it inherits from Vector.
23 years ago
You need the java plug-in in order to use Swing anything in your browser. IE only supports a watered down version of Java 1.1, so anything newer won't work (hence the class can't be found). You can find the plug-in on Sun's website, but I think it makes you download the newest SDK as well.
[This message has been edited by Lucas Richardson (edited July 25, 2001).]
23 years ago
Someone please correct me if I'm wrong, as I haven't used stacks before, but my understanding of them was that they're growable and hence, in Java, it isn't possible to get a stack overflow. It automatically increases on it's own. (It extends Vector).
23 years ago
1. On Sun's web site
2. When you want to run a java program (application or applet)
3. Hard to say, but probably not a whole lot since, as far as applets go, people will just be prompted to download the java plug in. Applications written in java tend to come with their own copy of the appropriate JVM.
23 years ago
It gives the first error because SelectName() has no return type. Since it doesn't return anything, just add "void" to the start of the line. The other two errors occur because you're trying to create an instance of the class SelectName, but it isn't a class. You do, however, have a class named Name, which looks like is what you wanted to use.
23 years ago
I'm not sure how you could out and out disallow expansion of a node, but you could try listening for a TreeExpansionEvent and have it colapse what was just expanded.
23 years ago
Are you sure that the file has been written to when you try to start the program in the second window? Also, when you try to start up the 2nd instance of it, is the first still running?
23 years ago