This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Hesham Gneady

Ranch Hand
+ Follow
since Feb 26, 2007
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hesham Gneady

You are right ... It depends on the Indexer to choose the best suitable words. He must think as the book reader to choose the right words.
But i still use the Index a lot if i do not want to browse all the book, and just check a specific topic ... may be i will be lucky
8 years ago
Okay ... It's now working. It worked when i used the TableModelListener(). It was a problem in my code, i was recreating the table model again somewhere else in my code, so it was overwriting the created listener. Now i fixed it.

Thanks a lot Rob.
10 years ago
Well i think i am using a normal JTable ... Nothing special.

I have tried getValueIsAdjusting() like this :

And the text is printed once, that's fine ... But when i enable/disable another CheckBox, nothing happens. The event occurs the first click only !
I am still checking if something in my code contradicts with that.
10 years ago
I have mostly changed all my listeners in my code from MouseListeners to ActionListeners. Everything now is going smooth and fine.

The last case i have is a JTable with a column of CheckBoxes inside it. I was using MouseListeners to detect any enable/disable event for any of the CheckBoxes inside that column and it was working fine except if i click on a CheckBox + drag with the mouse a very small distance then leave the mouse ... This leads to disabling or enabling the CheckBox but no event occurs.

I have checked the JTable listeners to replace the MouseListener. I have tried the TableModelListener but no event occurs, example :

Finally, i have tried ListSelectionListener and it worked fine, but the event occurred twice, example :

Can you please explain to me why TableModelListener didn't work and why ListSelectionListener was executed twice ?

Much appreciated ...
10 years ago
Thanks Rob for the tips ... I will read that now to stop bugging you
10 years ago
Yes .. You are absolutely right ... It worked fine now with ActionListeners.
I've been working with Java for more than 2 years now, and the same problem !! I'm always using MouseListeners. I need to understand ActionListeners better to use it.
10 years ago
Hi ,

I am trying to click "Ctrl + A" to fire a menuItem click event. I know its simple but i don't understand why its not working. I have attached a small Jar sample with my source code inside it to test it, and here is the part of my code defining the accelerator :

Thanks in advance.
10 years ago
I am setting all the images in my program the same way.
All images are located outside the jar file, in a folder called "images", so for example i set the frame icon like this :


Ok .... This is good, the same problem as you were saying. JVM looks for the logo image in the relative path, so i've changed the images' paths to be in the ClassPath ... And this worked fine
10 years ago
First i have tried to use the default Look & Feel instead of Substance and things worked fine this time. The file is loaded successfully.
Now for Substance i've traced the code here and they're doing a strange thing in the getBlankImage() method, they're throwing an exception to test its result which causes that problem.
10 years ago
Thanks a lot Rob ... This worked perfect
This file type association is getting me mad ... After fixing that problem, i've got a new strange Exception, also at the application startup :

I am using Substance for the Look & Feel ... People are saying that this Exception appears if some images are not found.
10 years ago
The bundle file is outside the jar file.
Here is my hierarchy :
app_folder -> pdf.jar
app_folder -> pdf.exe (I don't use the jar, instead i use the exe file)
app_folder -> languages -> english.properties

I want to keep the packages like this to allow users to edit the bundle file.
The strange thing is if i double click (pdf.exe) directly it opens fine without the error.
And if i double click a (*.amdli) file that is in the same path of (pdf.exe) it opens fine too.

But if i double click a (*.amdli) file that is in another path it will cause the error !!
10 years ago
You were right Rob ... When i tried to open a file outside the path of my program using java command in console, i got this exception :

My bundle file is located in "languages/english.properties" outside the exe, and here is the code i use to load it :

This code works fine if i directly double click the application to open it, but it causes that exception when i double click the file type association that i have mentioned (*.amdli) if that file was outside the path of the exe ... Any suggestion ?

10 years ago
Thanks Rob ... I have got something new here.
The problem is in the path of the (*.amdli) file. When i wrote the complete path of the file in the console, it worked fine, so both of those worked fine :

If the (*.amdli) file was in the same folder of the exe & i double click it, it opens fine.
So the only problem now if the (*.amdli) file was in another path other than the exe, when i double click it, then it shows the same error message.

Here is what i write in windows file type command to open that file :

It seems the "%1" passes only the file name, and not the file path, i have searched for a command to pass the full file path but i couldn't find it yet.

10 years ago
I hope i could find an answer for this, this time.

After i have defined a new extension (*.amdli) successfully in the Registry, i created a file (*.amdli), but when i double click this file to be opened with my program, the splash screen appears but then it gives the error : "could not find the main class : com.classes.MainClass. Program will exit".

My program is a jar wrapped inside an exe file, and if I double click the program exe directly it opens normally. Is there a problem of using the file type association with that kind of exe program ?
10 years ago