Win a copy of Head First Android this week in the Android forum!

henri henri

Ranch Hand
+ Follow
since Oct 03, 2005
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 henri henri

Thank you very much for your response Layne. You laid out for me some very important concepts that I still need to learn in order to complete my program and have it distributed. All of your assumptions about my file structure were correct. The whole thing is just so overwhelming. The program's imbilical cord attached to NetBeans will eventually have to be severed. You also mentioned some things about how NetBeans works that I have not had time to learn. Thank you for that too.

I came up with the following line of code in order to get an image in the Actors' folder. You also mentioned using System.getProperty(), I used this earlier on before posting this topic to get the sounds in my program.





Once again Layne, I really appreciate all the ideas you laid out for me.
Thank you very much.
15 years ago
I am using NetBeans 4.1
Filepath: D:\Titres de Film DVD\build\classes\film_titles\Actors
You can see by my code that my serialized file for my actor JavaBeans is in folder SER filepath: D:\Titres de Film DVD\SER
I would like to write the code in the Picture class to be able to get the images in folder Actors D:\Titres de Film DVD\Actors
If I use the "clean and build main project" command in NetBeans, the entire Actors folder is deleted.



15 years ago
My picture panel gets the image from the same folder that stores my class files in NetBeans but I have a folder called Actors and would like the filepath to be directed there. I have tried to use ./Actors/file.jpg without any succes.

15 years ago
Thank you to :

Stuart Ash
Ernest Friedman-Hill
Adam Richards
Jim Yingst
and Sameer Damle

for your insightful contributions
15 years ago
Thank you for your code example Jim. I am specifically iterating over a certain value located in a JavaBean that contains information about a film title. When I find the matching value using the IF statement, I want to stop the iteration. I will apply your code in this case. In the case of Iterator.hasNext(), I presume that the loop does not begin iterating a second once it has iterated over every value. I am trying to learn about these things to give my program a fine tuning and better resource management.

Thanks for your comments.

Henry
15 years ago
When iterating over the values of a HashMap using a FOR loop, is it necessary to use break once a match has been found, assuming one item is being searched for?

I assume if one is iterating over keys, and no two keys can be identical, once a match is found iteration stops.
15 years ago
can one use too many static references in a program?
15 years ago
My inner class is a simple JPanel with JTextField and JButton. When I instantiate it from within its enclosing class, I just see a gray square.

15 years ago
Please disregard this post. I was able to restructure two new classes found on the Internet and use them in my application.



15 years ago
If I use the first snippet of code in my GUI based application, my sounds load and play alright. If I use the second example, the sounds in my application, I stress application and not applet, don't play. I cannot find alot of information or examples of how to use sounds in an application. I have tried everything to no avail.



___________________________________________________________________________


15 years ago
http://www.pollscanada.com/screenshot2.html


Thank you for your interest in my problem.
I have the above code in my JInternalFrame (AddTitleFrame) class.
isClosed is a static class member with default access.
it is initially declared false.

I try to use it in my main class whose visual representation you can see if you follow the above link. The boolean flag is what does not work.
I want it to work so that if the JInternalFrame is closed, when a user clicks on an actor name in the JList to the right of the visual guide, the undecorated actor JFrame will appear. If the JInternalFrame is open then the JFrame containg the ActorBean information will not open if an actor name in the list is click. It is a question of notification, but the boolean does not work in this case. It has something to do with a thread I was told. I have tried everything!!

http://www.pollscanada.com/screenshot2.html

This screenshot can better illustrates what exactly I am trying to do.
The undecorated JFrame should appear if the JInternalFrame is closed after clicking on an item in a JList that you don't see because it is behind the CardPanel on the right where you see the 26 buttons.
I am so sorry to get back to you so late. I tired your code and it does work however, I lose those lovely refined Swing borders around the JInternalFrame. I get a thick blue line around the whole frame.
With patience, I have managed to stabilize my layout and everything
is very snappy now, I will keep your code for future reference.

Thank you so much. and sorry for the late response.

http://www.pollscanada.com/screenshot.html
15 years ago
First of all, I am working with a JList and an InternalFrameListener for a JInternalFrame.

My JList has to serve two functions. If the JInteralFrame using the method below is closed, a selection made in the JList will open an undecorated JFrame containg information about a specific actor. If the JInternalFrame is open, this function is foregone and the selection made will go into the text box meant for that item and the JFrame previously mentioned will not appear. I am trying to detect when the JInternalFrame is open or closed by using a boolean flag.
The flag used in the method below works for the method clearText() which clears all text in every text box once the window is closed. So I know it works. The boolean is a static member and is therfore expected to be used in the main class with dot notation to test for whether the JInternalFrame is open or closed.
I used it as such if(AddTitleFrame.isClosed) doSomething(); // in main class

It doesn't work.