Image is created by ImageIcon's getImage () method. Data enter by user in the text field is stored in String object and Image is created using that object. This class will be a panel and action listener for the button will be in this class. Get a reference to that, and you can set it where you wish. Step 3: Drawing the Image For drawing the image, we will create a separate class inside the main class. In Figure 1, you can see that by using Applet program running in a. ![]() ![]() this example with Applet instead of JApplet import java.awt. window, an Applet runs in the Appletviewer ( a test utility for Applets that is. The WelcomeApplet applet as viewed by the applet viewer. drawLine(width, height, i width / 10, 0) // drawLine(x-start,y-start,x-end,y-end). The top-level container of an applet in applet viewer is generally a Window. Screenshot-12 shows what you see in the applet viewer window. In contrast to the other poster, I think this is a pointless exercise and prefer their suggestion to make an hybrid application/applet to make development easier.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |