User Profile
Collapse
Profile Sidebar
Collapse
BigDaddyLH
Last Activity: Nov 10 '08, 04:41 PM
Joined: Dec 7 '07
Location: Kelowna, BC Canada
-
Welcome to the Java forum! Are you the Walkin' Wikipedia Man I read about on SlashDot? -
-
Can you be more specific about your error? By the way, my compiler noticed a semicolon here, which should not be there:
[CODE=Java]
if (denominator2>d enominator1);[/CODE]...Leave a comment:
-
Sometimes one's behaviour is punishment enough. I hope you like Color.PINK....Leave a comment:
-
You may also what to explain what your goal is, in a little more detail.Leave a comment:
-
Try your favourite Internet search engine. It's not hard, just choose a few keywords like :"JTable" and "Paging". Here is an example:
http://www.google.ca/search?hl=en&q=JTable+Paging
Now look at the hits you get. The very first is an article entitled "Paging in a Swing JTable".
This fantastic technique (searching the Internet) is great for not only answering Java questions,...Leave a comment:
-
Take a look at lines 17 and 18:
[CODE=Java]throw new IllegalArgument Exception();//17
return false;//18[/CODE]
Line 18 will never be executed because line 17 throws an exception, so 18 is unreachable. Solution: delete the unneeded line 18!Leave a comment:
-
It sounds like you are trying to programmaticall y POST. The Jakarta Commons HTTPClient can help.Leave a comment:
-
-
Leave a comment:
-
How to update the PATH variable (Windows): http://java.sun.com/javase/6/webnote...ml#EnvironmentLeave a comment:
-
You just asked the same question here: http://forums.sun.com/thread.jspa?threadID=5324768
Weren't the answers sufficient?
Why do you want to know this?Leave a comment:
-
I agree with JosH: The JLS is the Java Bible when it comes to definitive answers. It's not mathematics, but parts of it can be difficult to read because the Java language needs to be precisely defined. (If you think it's hard to read, try reading some legal documents!)
Anyway, it's also a good exercise to write a little code to test what you have read:
[CODE=Java]import java.lang.refle ct.Modifier;
interface...Leave a comment:
-
Applet? Swing? There's no need to roll your own: use a javax.swing.Tim er:
http://java.sun.com/docs/books/tutor...isc/timer.html
And in fact, there are some challenges combining Swing with threads:
http://java.sun.com/docs/books/tutor...ncy/index.html...Leave a comment:
-
Leave a comment:
-
-
ps.
There are times when it makes sense to add methods (even polymorphic methods) to an enumerated type, Check out the Planet and Operation examples:
[http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html]Leave a comment:
-
That way will be painfully slow -- you are copying the file directly, one byte at a time. Take a look at the InputStream/OutputStream methods that take an array of bytes. 8K is a good array size -- your code should be 8 thousand times faster!
Sukatoa's suggestion to use file channels is excellent as well. Did you follow his links and read?Leave a comment:
-
Your enum is over-engineered ;-)
The following in sufficient:
[CODE=Java]public enum Mechanics {ISOLATION, COMPOUND};[/CODE]
There is no need to define a "value" property as you did. Enum defines a property ordinal that does the same thing. Enum also overrides toString, equals, hashCode and clone correctly. Enums implements Serializable and Comparable as well.
To save and restore...Leave a comment:
-
Note, by the way, there's nothing special about this being an "image" file. You question was general to any binary file: for example, how to copy .class files.Leave a comment:
No activity results to display
Show More
Leave a comment: