Jackie Davis

Greenhorn
+ Follow
since Mar 04, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 Jackie Davis

thanks for that!

Another question, if I have sent a thread to sleep for 10secs.

Thread.sleep(10000)

How do I break out of the sleep if I un-check a checkbox?



Not sure if I use the .notify() method or where to use it.
17 years ago
How can I disable AWT checkboxes and scrollbars? I can't seem to find any relevant API.

for example in pesudo code:

17 years ago
Hi, having read some of the other posts I am not sure which method to use. I want to be able to pause running through some code for 1000ms and then restart. I have two methods, one running straight after the other. I would like to be able to delay starting the 2nd method for a short period.

Thanks
17 years ago
Thanks for the explanation! This has just solved my problem too
17 years ago
Hi I am parsing a text file. Its in a custom XML style of format. I want to extract certain values from the text file and store them in some classes I have made.

Just wondering if StringTokenizer is the best thing to use here? Any recommendations would be grately receieved too.

Many thanks
17 years ago
Thanks for that! It works a treat.

Just so I can attempt to increase my knowledge of Java ... what are the main differences between these two methods?

Is the code you posted to with 'Key Bindings'?

I intially looked at that, but it seemed complicated.

Thanks
17 years ago
Hi,

I'm a bit baffled by my code. When the frame loads up I have to press tab once, before I can get the app to recognise a KeyEvent. Once released, I have to tab again before the key is recognised.

Ideally I would like a response, without having to stroke the tab key 1st.



I guess its something to do with the focus. I do have other components in the frame, but I want the whole thing to respond to keystrokes. I thought I'd got around this by adding the KeyAdapter to the frame.

Any suggestions?
17 years ago
Thanks for all your help, think I've sorted it now

17 years ago
Sorry Gareth, my crap naming conventions are at fault.






I am looking into the Comparable interface, but running into problems.

I have



I understand this should return an int. At the minute its returning a float. I've tried casting the value to an int but its throwing errors.

Is that any clearer?
17 years ago
Hi guys, thanks for your reply.

Is this a good method of doing what I am aiming to do?
If so, I'll play around with it and see how I get on.

If you have any other suggestions, please let me know.
17 years ago
Hi,

I have an array of an array and I am getting a bit confused sorting it.



It has been populated e.g



... I think thats how it stored anyway?

How do i sort my array according to 'aValue'

So it would arrange may array as follows:



Ive only included snippets of my code, if I need to provide more, let me know.

Thanks
17 years ago
Very helpful!! Thanks

This is one fine community!
18 years ago
Hi,

I have 3 scrollbars

Is there a way to determine specifcally which scrollbar has been adjusted?



For example, if Scrollbar sb2 is adjusted, I only want to do someMethod(v2). At the minute my code does all 3 methods.

Please help

Thanks
18 years ago
Hmmm...

I see what you are saying. But I have a 'Mesh' object intialised in the MeshTesterGLSpace class called 'geo'.

I have a seperate Mesh class with methods.

I would like to use the object geo in ScrollListener (i.e geo.getVertices(); ). But because the Mesh object 'geo' has not been initalised in the MeshTester class I cannot use it here.

Hope I've explained this ok.

How do I get around it?

Thanks
18 years ago
Hi there, another concept Im struggling with...







I have methods defined in a Mesh class. I want to use these methods as the scrollbar is adjusted - (i.e. within the ScrollbarListener class - geo.someMethod() ) However geo is inialised in the MeshTesterGLSpace class. How can I use this object (geo) in the ScrollbarListener class?
18 years ago