Stephanie Grasson

Ranch Hand
+ Follow
since Jun 14, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Stephanie Grasson

I am moving this post to the IDE's forum because I think you will get a better response there.
Stephanie
Ryan,
I believe that EXIT_ON_CLOSE is a static member of JFrame. Therefore, if you do NOT extend JFrame, you probably need to use the fully qualified name, i.e., JFrame.EXIT_ON_CLOSE.
Hope this helps.
Stephanie
23 years ago
Thanks to all for your responses!
Sandeep,
Your link to the thread by Junilu Lacar was especially helpful, as that thread and the article it refered to best addressed the real intent of my question. It seems what I need to consider more when designing the class is "Why does the client need this information?" and "How will they use it?" as opposed to being so focused on actual data types. Thanks again!
Stephanie
I feel like I am missing something obvious here, but I am perplexed.
Most all sources recommend that, when designing a class, all data members should be private, accessible only via methods of that class. One of the justifications for doing this is to ensure that the nature of those variables is irrelevant outside the object. This means that you can change how the data is stored without requiring code which uses the class to be rewritten.
Now say, for a simple example, that you are working with a microscope. One of the data members of your class holds the current position of the focus axis. Obviously, as you are focusing, this value will change frequently. So you will provide a getFocusAxisPosition() method.
Here is the part I don't understand. Say that when you started you declared the focusAxisPosition to be an integer. Later hardware improvements allowed more precision and so you changed the internal representation of focusAxisPosition to be a float. Now, doesn't the definition of method getFocusAxisPosition() have to change to reflect the new return type and don't all methods which call this method also have to change?
Please forgive me if I have missed something silly or obvious. It certainly feels that way. Any insight would be greatly appreciated.
Thanks.
Stephanie
Chris,
You probably need to use the Java Plug-in, which directs applets to run using Sun's Java 2 Runtime Environment, Standard Edition
(JRE) instead of the web browser's default virtual machine.
For more information about the Plug-in, see here: http://java.sun.com/products/plugin/
Hope this helps.
Stephanie
23 years ago
Amit,
What problem are you having exactly? Do you get an error message or do you just not see your applet? Are your *.class files and the *.html file that contains your applet in the appropriate directory? It is difficult to diagnose your problem without more details.
Also, please be sure to register with a proper name. "amitshah81" does not follow the conventions. For more information, see here: http://www.javaranch.com/name.jsp .
If you do not use a name which follows the conventions, your account will be disabled. I value your posts and I would hate to see that happen.
Thank you for your cooperation.
Stephanie
23 years ago
matzeflapse,
I am moving this post to the Java in General Intermediate forum because your question is not really related to applets and I think you might get a better response there.
Also, please be sure to register with a proper name. "matzeflapse" does not follow the conventions. For more information, see here: http://www.javaranch.com/name.jsp .
If you do not use a name which follows the conventions, your account will be disabled. I value your posts and I would hate to see that happen.
Thank you for your cooperation.
Stephanie
23 years ago
matzeflapse,
I am moving this post to the Java in General Intermediate forum because your question is not really related to applets and I think you might get a better response there.
Also, please be sure to register with a proper name. "matzeflapse" does not follow the conventions. For more information, see here: http://www.javaranch.com/name.jsp .
If you do not use a name which follows the conventions, your account will be disabled. I value your posts and I would hate to see that happen.
Thank you for your cooperation.
Stephanie
23 years ago
sridhar,
Please be sure to register with a proper name. "sridhar" does not follow the conventions. For more information, see here: http://www.javaranch.com/name.jsp .
If you do not use a name which follows the conventions, your account will be disabled. I value your posts and I would hate to see that happen.
Thank you for your cooperation.
Stephanie
23 years ago
Aayush,
You could try something like this:

Hope this helps.
Stephanie
23 years ago
himanshujs,


So,can you tell me how to set up the Security policy of Applets


There are a number of security issues related to applets. This section of Sun's Java tutorial may help you:
http://java.sun.com/docs/books/tutorial/applet/practical/security.html
If not, could you please post again with a more specific question. For example, what is your applet trying to do that is causing the security problem? Is it trying to write to the client's machine, make a network connection, etc.? It will be easier to answer if the exact issue is known.
Also, please be sure to register with a proper name. "himanshujs" does not follow the conventions. For more information, see here: http://www.javaranch.com/name.jsp .
If you do not use a name which follows the conventions, your account will be disabled. I value your posts and I would hate to see that happen.
Thank you for your cooperation.
Stephanie
23 years ago
Congratulations guys!
I am duly impressed.
Stephanie
23 years ago
vandana,
Please be sure to register with a proper name. "vandana" does not follow the conventions. For more information, see here: http://www.javaranch.com/name.jsp .

If you do not use a name which follows the conventions, your account will be disabled. I value your posts and I would hate to see that happen.
Thank you for your cooperation.
Stephanie
23 years ago
Simcel,
I don't think you can add a frame to an applet. A frame is its own window, with title bar, icon, etc. What was the goal here? Perhaps we can find you a better way to achieve it. Please let us know.
Stephanie
[This message has been edited by Stephanie Grasson (edited March 30, 2001).]
23 years ago