How to use Native Activity and View from Java
by lorydi » Thu, 10 Mar 2011 09:46:32 GMT
Sponsored Links
I have a game developed in Java with the SDK. Now I have to track the
events from Xperia Play touchpad which are only available in native
code. What is the most simple solution to do this? I want to keep the
Java code and only change the Activity into NativeActivity . The
problem that I face is that I don't know how to make the paint on the
my normal SurfaceView class, the screen remains black.
--
Re: How to use Native Activity and View from Java
by jaafar zbeiba » Sat, 12 Mar 2011 04:21:55 GMT
I use a JPasswordField but I have a problem with java.awt.event java.swing
and that can help me
com.example.tuto package;
import javax.swing .*;
import java.awt .*;
import java.awt.event .*;
public class Input extends JFrame implements ActionListener {
JPasswordField pass;
JButton test = new JButton ("get");
public Password () {
JPanel pane = new JPanel ();
test.addActionListener (this);
pane.setLayout (new FlowLayout ());
pane.add (pass = new JPasswordField (15));
pane.add (test);
setContentPane (pane);
setVisible (true);
}
--
Sponsored Links