Java, is a programming language that runs on many platforms and not just windows. If Sun created a method just for shutting down windows, that would go against the portablity advantages of the language. Sun would have to create a shutdown method that basically shuts down the JVM and the...
No, you can do that with what they call JAR files. A Jar file is a Java Archive file. Kind of like a Zip file with all your classes and files within it. There is a Jar utility that comes with the JDK to create them.
If you create a JAR file and a manifest file for it, then you can do this...
What you are trying to do can not be done with Strings because their data physically can not be changed in Java. If you want to change the data at specific subscripts, you must use class StringBuffer.
You can however do the following with Strings:
String myString = null;
myString = myString...
You want to look at the dispose() method. If using a Frame or JFrame it releases the window resource in memory.
Also, It is not really a child, you are just creating another instance of the object. You should have the other Frame in memory running if you did not dispose() it. When you close...
java.exe is the sdk command you execute to run a Java Application. It can be found in the c:\jdk1.3\bin folder. You will also find there the javac.exe which is used to compile your java programs. Java programs have the .java extension. After they are compiled they have the .class extension...
Here is a little piece of code which works great for me.
//Center the window
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = this.getSize();
if (frameSize.height > screenSize.height) // make sure frame fits
frameSize.height = screenSize.height...
Good point LeonTang,
I find myself preferring to write the GUI myself and the Layout Managers. When using the IDE's a lot of code is added by the IDE.
If I am in a hurry, I do the visual programming with the components and them modyify the code to do what I want it to do.
My students think I...
Yes, I know LeonTang,
I mentioned that above and it is a swing GUI class. I use it all the time and I prefer it. I don't know what Hiren is using AWT or SWING GUI? They should never be mixed. One or the other. Also, you will need a Plug in from SUN if you are using Swings in Applets. The...
Make sure you use the same field order as what is in your select. I beleive they have to match. I had some code which calls store procedures on a SQL server and I had to make sure the order matched the Select.
Brian
If you use a full IDE with your Java programming, such as JBuilder, it comes with the API methods embedded in a tree form. You can expand on packages, classes, etc. to see the original code used by Sun with their developement. You can not change the code, but you can view it and read their...
Yes, there are countless ways to displays messages in Java Applets.
1. Put a label on your applet and use the setText() to change a message for the label caption.
2. Use the showStatus() to put a string on the status bar of your applet.
3. Use JDialog (swings) or Dialog (awt) to interface...
NO, the sample code I gave you is in pure Java and not VB.
Visual Basic is a totally different programming language. A completely different animal.
Here is sample code on how to call a second html form from your Java applet.
You should look up these classes and methods to become familar with...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.