Qusay Jaafar

Ranch Hand
+ Follow
since May 06, 2002
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 Qusay Jaafar


the result will be:
z: 0.30000000000000004
This result happens with the double only, why?
15 years ago
thank you for your reply.
Let us leave the provider in this stage.
What I am thinking now is writing an application contains a JTextArea and a JButton("Send"). User writes a message into a JTextArea and then click "Send" button. The message will be sent from his PC to a specific mobile phone.
I have no idea where shall I start to write such application and what kind of java packages shall I use?
15 years ago
How to send a message from a java application (into a PC) to a Mobile phone?
any idea? book? anything will be helpful?
thanks
15 years ago
thanks for that.
my second question is:
consider these information:

first name
last name
address
email
phone

I want all those information to be in one element. when the user scroll to another element there will be another information for another person.
How can achieve that?
15 years ago
I need JList into a GUI but I need to scroll its elements horizontally not vertically.
just consider its element (right now) as one object.
15 years ago
Using a vector is the same as using an array or using add(object) method. JList will display all those information vertically.
Let me ask my question in another form.
I need JList into a GUI but I need to scroll its elements horizontally not vertically.
just consider its element (right now) as one object.
15 years ago
Sorry, the image that I created was not clear enough.
15 years ago
thank you for your reply but may by it was my fault that I was not clear enough.
What I meant is to create a JList into a GUI like the one below:

|--------------------------------------------|
| first last first1 last1 |
| 11 this Rd, 22 another Rd, |
| first@mymail.com first1@hismail.com |
|---------------------------------------------

--------> Reading this JList in this direction
You can see the first item in this JList contains many information about a person called (first last), his address and his email, so when the item is highlighted, all those information will be highlighted at one time considered as one item in a JList.
15 years ago
How to create a list that its containts displayed horizontaly?
another thing please,
each item in this list contains many information (e.g name, address,..) all this information is a one item in a horizontal list.

thanks for your ideas
15 years ago
I felt sorry for his death. I am feeling now the same feeling when I heard that my teachers in my high school passed away one after one. They taught me something oneday and I appreciate that all my life. The same thing for Phillipe and that's throught SCJD forum. I appreciate whatever you taught me there.
Let your soul layed peacefully inshallah...

Qusay
15 years ago
the code below can show you the main idea of what I am doing.
if new ActiveThread("1") starts then bytes in SwitchData will be changed. Now, if new ActiveThread("2") starts then bytes in SwitchData will be changed againd. Now, if new ActiveThread("1") called from the hashMap then bytes is something different than what it should be.

I am thinking now to use ThreadLocal instead of Thread class.

your suggestions please...

Hi,
I just read a reply for a message. The last reply for this message was from Ernest which was:
(The purpose of the ThreadLocal class is indeed to create variables that are specific to a thread, but it's used for member or static variables. As has already been (correctly) stated in this thread, the local variables of a method, static or not, are unique to that single method invocation, and are never shared with any other invocation on the same or any other thread.)

do you think using ThreadLocal will solve my problem?
Not really, I am working within a project for a network company. I am reading sent and received bytes from a specific port of a switch. So, I am thinking here to create a thread for each port for reading the data continuously and that is the purpose of start button. stop button will stop that thread which is typed in the text field. display button will read the thread which is typed in the text field and read the value of the bytes of that port.
I created a ThreadFactory pattern for each button which I think I don't need it for one of them.
click on start button will create a thread and I put it into a hashMap.
click on display button will search the hashMap for that thread and suppose to read the bytes for that port.
I think creating threads for each port of the switch that because of the counter for a port will reset (starts again from zero) when the bytes reached for that port 4GB. So, creating a thread for a port will keep reading the bytes.
is my approach reasonable?
and BTY, I read the last tech tip of MultiThreading in Swing
it used another approach for handling event dispatch thread and that by using Timer class.