Search:
Type: Posts; User: ozzyman
Search: Search took 0.08 seconds.
- 04-02-2012, 11:36 PM
Thread: Line2D, getting NullPointerException
by ozzyman- Replies
- 4
- Views
- 297
Re: Line2D, getting NullPointerException which line is line 65?
- 03-28-2012, 06:28 PM
- Replies
- 2
- Views
- 2,089
Re: Cookies and request.getAttribute() / request.setAttribute() question If they land on the "file.jsp" page directly, you should send them backward to the starting point (wherever that may be in your system).
It's just like any website with a login area, if you try to... - 03-28-2012, 06:20 PM
Thread: print screen help
by ozzyman- Replies
- 6
- Views
- 491
Re: print screen help The time is in milliseconds. In future you can refer to the java docs if you're not sure. In fact I posted the link to it already in my previous post.
In case you don't know, 1000 milliseconds = 1... - 03-26-2012, 03:03 PM
Thread: Stack Elements
by ozzyman- Replies
- 15
- Views
- 451
Re: Stack Elements Dougie, you can create a Comparator with a generic type and then override the compare(T obj1, T obj2) method to compare two of your objects (of type T).
You just need to tell the Comparator how to... - 03-24-2012, 05:02 PM
Thread: ArrayList<String>
by ozzyman- Replies
- 12
- Views
- 1,501
Re: ArrayList You just need to show all the bits of code where things are added or removed from the ArrayList so you can see where the ArrayList is being emptied.
I can see your methods for adding to the... - 03-24-2012, 12:34 AM
Thread: ArrayList<String>
by ozzyman- Replies
- 12
- Views
- 1,501
Re: ArrayList I did mean the actual code for the pseudo-code of the methods to do with the ArrayList that you posted before.
Anyhow, this doesn't seem right:
1. You're using the ArrayList.add(int index, Object... - 03-23-2012, 08:17 PM
Thread: print screen help
by ozzyman- Replies
- 6
- Views
- 491
Re: print screen help If you use a while loop you have two problems:
1) Your thread doesn't respond until the while loop has finished and
2) Capturing the images every second would clog up your main thread anyway
So... - 03-23-2012, 08:03 PM
Thread: ArrayList<String>
by ozzyman- Replies
- 12
- Views
- 1,501
Re: ArrayList The JVM doesn't lie; if it says the array size is 0 it means its 0.
There must be something in your code removing it or clearing the arraylist.
Either that or you're using the wrong variable.
... - 03-23-2012, 05:25 AM
Thread: Shortest path
by ozzyman- Replies
- 5
- Views
- 468
Re: Shortest path Where -what- was? You didn't tell us anything about any error messages, compile problems or your current output.
- 03-23-2012, 05:15 AM
Thread: trouble in getting pattern with regex
by ozzyman- Replies
- 4
- Views
- 397
Re: trouble in getting pattern with regex Why didn't you just parse the XML to get the values directly?
There are tools in java to read XML files for you.
You could have read the values into objects and then write/map those objects to... - 03-23-2012, 05:11 AM
Thread: Shortest path
by ozzyman- Replies
- 5
- Views
- 468
Re: Shortest path Please edit your incredibly long post, and replace it with a clear, concise question relating to a specific problem or error you are having.
If you had said, I need my output to be "this" and its... - 03-23-2012, 05:04 AM
Thread: Question about split()
by ozzyman- Replies
- 6
- Views
- 428
Re: Question about split() trim() wont help you here
Use String.replace(" ", "") to replace white space with nothing
Then use String.toCharArray() to return a char[] array which will contain each char in a separate array... - 03-23-2012, 04:59 AM
Thread: print screen help
by ozzyman- Replies
- 6
- Views
- 491
Re: print screen help So you want one pic every second?
You could use a Timer, TimerTask and Timer.scheduleAtFixedRate(TimerTask, 100, 1000) to repeat the task every second, starting after 0.1 seconds.
Then you... - 03-23-2012, 04:49 AM
Thread: Question about split()
by ozzyman- Replies
- 6
- Views
- 428
Re: Question about split() String.split allows you to specify a delimiter to split the String by.
Try something like this instead:
String s = "split-this-string";
String[] sArr = s.split("-");
String.trim()... - 03-23-2012, 04:44 AM
- Replies
- 4
- Views
- 2,219
Re: How to insert music such mp3 to java program Please edit your post to wrap your code in CODE tags so that it is formatted.
Please also indent your code so that it is easier to read.
Also, please only post code that is relevent to your... - 03-23-2012, 04:41 AM
Thread: Guidance for Stock trading software
by ozzyman- Replies
- 3
- Views
- 703
Re: Guidance for Stock trading software Yes, but don't worry so much about the different words they use. Java, Core Java, Servlet, and Beans are all written in the same language.
"Core Java" just means the Java Standard Edition (talking... - 03-23-2012, 04:25 AM
Thread: Problem when reading files
by ozzyman- Replies
- 1
- Views
- 324
Re: Problem when reading files You will need to take input from the User, which you could do with the Scanner class. You then need to read a text file and check if what the user entered matches any password/username combination -...
- 03-23-2012, 04:17 AM
- Replies
- 2
- Views
- 1,179
Re: Creating recursion method to use Newton's method for square roots Instead of using a while loop, you need to allow the method to call itself to repeat the part of code you are repeating in your loop. Get your logic right, or you could get a StackOverflow error -...
- 03-23-2012, 04:09 AM
- Replies
- 1
- Views
- 594
Re: I was wondering if it is possible to record with Java Well if you can get XBOX 360 on your PC monitor, you could quite easily record it by taking screen captures and then saving the frames or creating a video of the frames and saving that.
You will... - 03-23-2012, 03:57 AM
Thread: Multiple java elements won't play nice.
by ozzyman- Replies
- 2
- Views
- 440
Re: Multiple java elements won't play nice. I totally agree with Fubarable here, except for one thing: Java is to Javascript as Ham is to Hamster?
I'll give you a better one; Java is to Javascript as Ham is to Hamburger.
You could've... - 03-23-2012, 03:46 AM
Thread: drawing in java
by ozzyman- Replies
- 4
- Views
- 474
Re: drawing in java Maybe you need to revalidate the layout after you've done your painting? I haven't tried your code but that would be something I'd check out
- 03-23-2012, 03:32 AM
Thread: ArrayList<String>
by ozzyman- Replies
- 12
- Views
- 1,501
Re: ArrayList IndexOutOfBoundsException means that in your Array or ArrayList/Collection (any type of array) there was an attempt to access an element at an index that didn't exist or was invalid.
In this case... - 03-23-2012, 03:26 AM
Thread: Help with Abstract Classes please.
by ozzyman- Replies
- 1
- Views
- 346
Re: Help with Abstract Classes please. This is very similar to your other question. Again, you should read the inheritance java tutorials fully so that you understand it properly.
Here is the link again:
Inheritance (The Java™... - 03-23-2012, 03:24 AM
Thread: Stack Elements
by ozzyman- Replies
- 15
- Views
- 451
Re: Stack Elements You can create your own comparator to compare any object you like... what do you mean Collection objects? a Collection can hold any object... its just a collection...
If you prefer to reuse code... - 03-23-2012, 03:23 AM
- Replies
- 1
- Views
- 340
Re: Very interesting Abstract Class behavior. Please Help :) The field 'age' in ConcClassA hides the field 'age' in its super class. If you remove this field from the sub-class, then the variable 'age' will have to refer to the field in the super class. This...
Results 1 to 25 of 500



License4J 4.0
Today, 12:23 AM in Java Software