Has anyone imported DrawingPanel.java to Eclipse? -
I am working on a computer science graphics project for which I am using the drawing panel. I am new to this and the explanation I have seen which is far too close to me has no meaning for me.
The code has been presented in this form so I have to work it this way need to.
import java.awt. *; // so I can use the Graphics Public Class Outline tool {public static zero main (string [] Args) {drawingPanelPell = new drawingpanel (150, 70); Graphics G = Panel .getGraphics (); }} I have been told that I have to import "Drawing" in my project in any way.
I tried the file -> Import -> General -> Filesystem but what happens is I do not mean I saw a post anywhere, which said that this drawing panel can zip Java And it can change with the name of .jar and then it can import it somehow. I did not get anywhere with it, then I tried to load the drawing penny in my project. But what then?
It seems that I need to step by step ... first press this button, select that file ... Press this button. Type of instructions No leap of logic I am very dense at this point.
Any help would be appreciated.
If you have easy access to a DrawingPanel.java file folder, then you drag it into eclipse For example, by simply dragging and dropping the package explorer:
As a side, you should not get a graphics object by calling a graphics () on a component, because the graphics object obtained is less Minister will and will not work after Ripents. Instead, your drawing should be within the Paint Companent method of a JPNL, which is probably what the drawing panel is already doing.
Comments
Post a Comment