Abder-Rahman Ali

Ranch Hand
+ Follow
since May 22, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Abder-Rahman Ali

I'm following all the answers, and I really don't know what is the issue posting on all forums.

I don't think that I should comply with things that actually don't make sense.

Is there a problem asking more than one person on different forums? If you can help, I would appreciate it, if you cannot, you shouldn't write things beyond the subject.

I really wish to see something related to Java here...

Think BIGGER.
9 years ago
Thank you so much for your reply.

I got what you mean and they are really valuable.

But, can you just give me a hint on how to work in your last point?

So you need data structures that store all shapes to be drawn - those data structures would be populated in the events handlers, and then used in the paintComponent method. At the end of the event handler, you would call the repaint() method to tell Swing that it needs to repaint the window.

Thanks.
9 years ago
I have the following code shown below, which will be able to draw a shape once clicking on a button. For example, if you press the "Draw Rectangle" button a rectangle should be drawn and so forth.

I have reached to the point where to determine the button pressed, but UNABLE to add the drawing functionality after that. How can I draw a shape after pressing a button?



Thanks.
9 years ago
Thanks Rob, you are absolutely right.
9 years ago
I have this code which is a JFrame with a JPanel and three buttons.

When I run the program it just closes AUTOMATICALLY. Why is that?



Thanks.
9 years ago

Sebastian Janisch wrote:The length in bytes

Thats what the API says ...
http://java.sun.com/javase/6/docs/api/java/io/File.html#length()



Thanks Sebastian.

So, is it counting the bytes in a file then?
9 years ago
If I do the following for example:



What does the number returned by fLength represent? In other words, what is it counting in the file? If I have an image, what is it counting here for example?

Thanks.
9 years ago

Michael Dunn wrote:where do you add the picturePanel?

don't use paint() with swing components - use paintComponent()



Yes, exactly, this is the case.

How do I add the "PicturePanel" to my GUI? This is the the problem I'm facing.

Thanks.
9 years ago
Hello,

I have created a GUI with the menus "File" and "Help".

"File" has a menu item, "Open Image...".

I'm just having an issue DISPLAYING an image at the GUI.

I have my "Open Image..." menu item as follows:



And, the code that is responsible for displaying the image is:




And, finally the code that displays the creates and shows the GUI is as follows:




Thanks.

9 years ago

Ulf Dittmer wrote:I was hoping you'd point us to a source; there are several possible interpretations of the term, but none that is commonly used.



It is actually a thing a Professor I'm working with requested and told me that it is used for historical reasons that have small header and footer, but didn't ask him yet since I didn't start yet but wondered if anyone heard of that term.

Thanks.
9 years ago

Ulf Dittmer wrote:That's not a term that's commonly used; where did you encounter it?



A research I'm doing. Required to read such types of images.
9 years ago
I just want to ask the followingL

1- What is a byte image?
2- Why do we use such images?

Thanks.

---
twitter.com/abderrahmanali
9 years ago

David Newton wrote:Isn't it just a library?



It actually contains many files, but noticed that I have to download them in a specific way determined here: http://download.java.net/media/jai-imageio/builds/release/1.1/INSTALL-jai_imageio.html and now just getting problems in changing permission for the JDK at my MAC OS X machine.

Thanks.
9 years ago
How can I add JAI (Java Advanced Imaging) to the Eclipse IDE?

Thanks.
9 years ago
Thank you so much.
9 years ago