JPasswordField under android

by jaafar zbeiba » Sat, 12 Mar 2011 04:21:48 GMT

Sponsored Links
 hello I use a JPasswordField but I have a problem with java.awt.event
and java.swing

package com.example.tuto;

        import javax.swing.*;
        import java.awt.*;
        import java.awt.event.*;

        public class  Password()  extends JFrame implements ActionListener {

                JPasswordField pass;
                JButton test = new JButton("get");

                public Password(){
                        JPanel pane = new JPanel();
                        pane.setLayout(new FlowLayout());
                        pane.add(pass = new JPasswordField(15));

                public void actionPerformed(ActionEvent evt) {
                        Object source = evt.getSource();
                        if(source == test) {
                                char[] tet = pass.getPassword();
                                System.out.println(new String(tet));

                public static void main(String[] args) {
                Saisir p = new Saisir();

help me please thxx


Re: JPasswordField under android

by Justin Anderson » Sat, 12 Mar 2011 05:08:41 GMT

 Ummm.... swing and awt are not included with Android.

Justin Anderson
MagouyaWare Developer 

On Thu, Mar 10, 2011 at 2:44 PM, jaafar zbeiba <


Sponsored Links

Other Threads

1. Android's Gallery is finding my Resource images!


I have an application that uses a lot of png textures. There are too
many to store with the app, so they are installed onto the SDCARD
instead. The problem is that the default android gallery is seeing the
png textures and is cluttering up the user's gallery screens with

Is there a way to mark this resource folder in a particular manner so
that Gallery will skip over it? Ideally, i'd like this to be something
that my app can set so that the user doesn't have to do it.

Thanks in advance!

2. Varying screen resolutions

Hi all. So, I've been building an app which I test on my Hero, with a
screen size of 480 x 320. The app is dependent upon Bitmap images,
placing them at specific screen positions (i.e. Canvas.drawBitmap
(bitmap, x, y, null) etc.).

Now of course I face the problem of how this app will be compatible
with new devices such as the Droid (854 x 480) and Nexus (480 x 800).
Testing on the emulator seems to show that there will be a large part
of the screen unused.

What are the options here? Is there some way that the final Canvas
output can be translated to fit a different screen size? Do I have to
resize my bitmaps depending on the screen size, and translate the x, y
positions accordingly?

Any suggestions appreciated!

3. installing files in the data/data/package using apk?

4. corporate calendar testing needed -help?

5. handling user groups in android

6. HashMap, ArrayList and fastest way to iterate Collections on Android (+other ways to make it run like a wild horse)

7. Presentasi madu dari bos Lucky