Hi I am trying to create simple shapes such as a rectangle and view it in the android emulator , I do not want to use android xml but java code as I will need to apply an accelerometer to it. I am using eclipse but I do not understand how I can use JPanel as eclipse doesn’t recognise it, do I have to install a plugin to be able to import JPanel and is that the correct way to go about creating shapes for android?
Any help would be helpful thank you.
Using java and android in eclipse.
JPanel is a swing component and not part of the Android SDK. You need to extend a view and draw using a canvas by overriding onDraw() or look into OpenGL if you want go into 3D drawing