Search Results

Showing results 1 to 11 of 11
Search took 0.01 seconds.
Search: Posts Made By: wildgoose ; Forum: Java and child forums
Forum: Java Aug 13th, 2009
Replies: 19
Views: 544
Posted By wildgoose
Where does <condition> come from? If its never cleared then the false logic won't be executed!
Forum: Java Aug 13th, 2009
Replies: 19
Views: 544
Posted By wildgoose
gFlag is global.

In your event handler for mouse, set gFlag=false;

Thread falls out of while loop upon gFlag being false then exits.

There will be micro-delay between the flag being set and...
Forum: Java Aug 13th, 2009
Replies: 19
Views: 544
Posted By wildgoose
bool gFlag = true;

Event sets flag to false, and causes thread to fall out of loop!
Simple but effective!


// while (true){

while ( gFlag ){
Forum: Java Aug 7th, 2009
Replies: 5
Views: 350
Posted By wildgoose
I'm not fluent in Java but threads are typically pre-emptive. Higher priority threads pre-empt lower priority threads. Threads of same priority are at the mercy of the tasking system.

One thought...
Forum: Java Jul 17th, 2009
Replies: 7
Views: 374
Posted By wildgoose
I'm rusty with Java but...
Watch your [] positioning. Also array is an int [] not a class!
But you have array.length


BubbleSort( array[], length );

public class BubbleSort
{
// ...
Forum: Java Jul 7th, 2009
Replies: 10
Views: 530
Posted By wildgoose
Post your entire code! Errors can be misleading without seeing everything in context!

For example if x is an integer or a double it can cause a problem with that printf. The fact that it was...
Forum: Java Jul 6th, 2009
Replies: 10
Views: 530
Posted By wildgoose
Please post your code!
Forum: Java Jul 2nd, 2009
Replies: 10
Views: 530
Posted By wildgoose
Ahem!

Given only radius gives you all the other data. No need to input.
Circumference = 2 * PI * r
Area = PI * r * r
etc.

I'm also assuming your x is entered as a Floating-Point value.
Forum: Java Jul 2nd, 2009
Replies: 6
Views: 382
Posted By wildgoose
for (int j = 0; j < 6; j++)
{
x = alignCoord[ j ][0];
y = alignCoord[ j ][1];

print x,y coordinates
}
Forum: Java Jul 1st, 2009
Replies: 6
Views: 382
Posted By wildgoose
based upon your description....


int alignCoord[6][2];
int index = 0;


public void mouseClicked(MouseEvent e)
{
if (index < 6)
Forum: Java Jul 1st, 2009
Replies: 6
Views: 382
Posted By wildgoose
Without a structure...


It is unclear what you want! You have a 10x10 array and you want to count everytime that area of the screen is clicked in the cell corresponding to that area, or merely...
Showing results 1 to 11 of 11

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC