|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
One other thing..
How do I make classes communicate with each other. If I have a class Chore.java and it contains nothing in it except the main method, in that method I want it to execute a applet contained in Applet.java, how do I tell java to execute that, like this?
public static void main (String[]args) { new Applet(); } ????? How do I get classes to use each other and communicate? I am used to writing small one class programs, and I want to expand. |
|
#2
|
||||
|
||||
|
First, make sure you import Applet
in the main method of Chore.java do something like this: Applet obj = new Applet(); then call the method like this: obj.whateverMethod(); Here's a tutorial from Stanford University professor: http://sepwww.stanford.edu/sep/josman/oop/oop1.htm You can also google for other Java OOP tutorials |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > One other thing.. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|